| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use a constant-time byte-by-byte secure comparison to compare potential password hashes rather than `String#==`, which uses strcmp under the hood and stops as soon as there's an unmatched byte.
|
see #42, which I didn't notice until after I did this. |
Sorry, something went wrong.
|
Also, this is breaking on a build on ruby-head - don't know if that's my fault |
Sorry, something went wrong.
|
(Bumping for CI) |
Sorry, something went wrong.
|
It buys nothing except "we're following best practices," which is in itself valuable. |
Sorry, something went wrong.
|
another +1 |
Sorry, something went wrong.
|
👍 from me too |
Sorry, something went wrong.
|
It is described in #43 why it is not necessary in this case. Has anything changed since then? |
Sorry, something went wrong.
Bcrypt has preimage resistance according to known methods. Science is a process and remember md5 was state of the art and invulnerable at some time. This extra safety precaution causes no practical performance hit, but increases security by a significant amount. Dismissing this best practice is simply naive as it exists for a reason. There is really no practical argument here, not to include this. The negligible performance decrease is not worth the security decrease. |
Sorry, something went wrong.
|
I’m not sure why you saw fit to resurrect a decade-old issue and specifically tag me but here we go.
Leave me alone. |
Sorry, something went wrong.
|
Closing in favor of #282. @glittershark I cherry-picked your commit in to #282 then added some trivial performance related stuff (specifically just avoiding array allocations). |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Use a constant-time byte-by-byte secure comparison to compare potential
password hashes rather than String#==, which uses strcmp under the
hood and stops as soon as there's an unmatched byte.