-
Notifications
You must be signed in to change notification settings - Fork 80
Problem: (CRO-577) Client allows weak passphrases #705
Conversation
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok, sans small dependency bloat and mild testing/development inconvenience
[[package]] | ||
name = "bit-vec" | ||
version = "0.5.1" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is a bit annoying / bloaty, as there's already bit-vec 0.6.1
(and bitvec
).
probably open an issue for another dependency review / cleanup
return Err(Error::new( | ||
ErrorKind::IllegalInput, | ||
format!( | ||
"Weak passphrase: {}", | ||
parse_feedback(password_entropy.feedback().as_ref()) | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is fine, but not sure how annoying it'd be in quick testing -- we'll see, perhaps later there could be a "unsafe_development_only" flag to bypass that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add following code in future to only build this in release builds:
if !cfg!(debug_assertions) {
// Check password score only in non-debug builds
}
tryBuild failed |
bors try |
tryBuild failed |
Codecov Report
@@ Coverage Diff @@
## master #705 +/- ##
==========================================
- Coverage 69.69% 69.64% -0.06%
==========================================
Files 131 131
Lines 16742 16767 +25
==========================================
+ Hits 11669 11678 +9
- Misses 5073 5089 +16
|
bors try |
tryBuild failed |
Solution: Estimate password strength using zxcvbn crate. Return Error when password score is less than 3.
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
bors r+ |
tryBuild failed |
This PR was included in a batch with a merge conflict, it will be automatically retried |
Solution: Estimate password strength using
zxcvbn
crate. ReturnError
when password score is less than 3.