| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## main #3422 +/- ##
==========================================
+ Coverage 59.21% 60.53% +1.32%
==========================================
Files 35 35
Lines 1709 1784 +75
Branches 379 403 +24
==========================================
+ Hits 1012 1080 +68
- Misses 559 562 +3
- Partials 138 142 +4
Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was a problem hiding this comment.
bcrypt!
Sorry, something went wrong.
|
@oxy do you mind taking a look at this today or tomorrow? |
Sorry, something went wrong.
There was a problem hiding this comment.
argon2 is a stronger algorithm but bcrypt is also alright - though I'm still a little confused about how you're handling authentication, what hashedPassword is used for with the cookie, and how/if we compare against bcrypt passwords in the auth route itself.
Sorry, something went wrong.
|
Notes:
|
Sorry, something went wrong.
|
@oxy do you mind taking a look at the security warnings/errors flagged by CodeQL? I know we plan to fix most of these in a follow-up PR but want to make sure my code isn't introducing anything you would flag: https://github.com/cdr/code-server/pull/3422/checks?check_run_id=2749748946 |
Sorry, something went wrong.
This uses argon2 instead of bcrypt. Note: this means the hash functions are now async which means we have to refactor a lot of other code around auth.
Since the hash and isHashMatch are now async, I had to update the tests accordingly. Now everything is working.
This adds the proper await logic for the hashing of passwords.
Since this checks if they are authenticated using the hash/password and it's async, we need to update authenticated to be async, which means we have to update it everywhere it's used.
There was a case with the hashed-password which had multiple equal signs in the value and it wasn't being parsed correctly. This uses a new function and adds a few tests.
This is necessary due to argon2 being added and an upstream issue where it uses a Linux build that is too new for CentOS 7.
|
Removed the docs as requested! Ready for another review |
Sorry, something went wrong.
There was a problem hiding this comment.
All good! Thanks for sticking through this ❤️
Sorry, something went wrong.
Thanks for sharing your security knowledge with me! I feel like I'm slowing becoming more mindful of it thanks to you 😂 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR modifies the underlying algorithm used in the hash function to use sufficient computational effort.
Changes
Screenshots
Using a hashed-password (sha256)
Screen.Recording.2021-06-03.at.11.37.25.AM.movUsing a regular password (not hashed)
Screen.Recording.2021-06-03.at.11.40.37.AM.movUsing a hashed-password (argon2)
Screen.Recording.2021-06-04.at.1.46.16.PM.movChecklist
Fixes #3381
Follow-up: #3432
Notes
Here is how authentication works in code-server:

Link to Excalidraw