-
Notifications
You must be signed in to change notification settings - Fork 6k
refactor: migrate from argon2 -> @node-rs/argon2 #4733
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
e52eb94
to
d796af5
Compare
d796af5
to
698c46f
Compare
Codecov Report
@@ Coverage Diff @@
## main #4733 +/- ##
==========================================
- Coverage 69.23% 69.18% -0.05%
==========================================
Files 29 29
Lines 1638 1652 +14
Branches 341 363 +22
==========================================
+ Hits 1134 1143 +9
- Misses 428 432 +4
- Partials 76 77 +1
Continue to review full report at Codecov.
|
698c46f
to
e888281
Compare
✨ Coder.com for PR #4733 deployed! It will be updated on every commit.
|
@yisibl any ideas why the artifact failed? |
What is the actual glibc version in Docker? |
And I'll draft a patch release after |
Yeah, I see |
Actually, idk if I could test on Termux, since whenever I tried it it didn't work. But I will try 3.9.3 and try learning how to do that. |
Uh oh... My Termux isn't working. From the beginning, I haven't able to get the mirrors updated, there isn't a sources.list file in my /etc dir. Idk what happened to my phone, maybe it's because I have an older phone. |
Wait we are supposed to use |
Upgrade to |
@Brooooooklyn will do - thank you for the quick patch! @yisibl - thank you for the review and feedback! @im-coder-lg no worries, I will test on Termux |
e888281
to
02944b3
Compare
This should fix the audit/code scanning CI failing (I'll rebase once merged): #4742 |
Testing this now! |
😅 I wish I had a good answer for that... |
@code-asher brought up a good point. our e2e tests run on Linux so those are passing which means this is good on Linux. |
@im-coder-lg any updates? |
TermuxPreviously, installing the project would fail on Termux due to argon2 issues. From what I can tell, it seems as though those problems are resolved with this PR! I couldn't successfully downgrade Node to v14 on Termux so code-server wouldn't actually run. So assuming someone can downgrade, it should work. |
I'll just test again. Since I didn't install Node 14 before running, I got into errors. I will try again and hopefully succeed. |
No worries at all. What I did was upload the |
Here's a link to the npm-package.zip if you want to download: https://drive.google.com/file/d/1VyB0i4GMf9yAo8n_DU-YkfPGRKnzb9Nf/view?usp=sharing |
Heads up: I'll be testing two architectures, the first one is AARCH64 aka. ARM64 and then ARMV7L which is integrated to Raspberry Pi OS Bullseye. |
LOLZ, all I needed to test was the |
This absolutely works. I am testing this once again with the hashed password and maybe again on armv7l. |
I can say this works successfully, although 4.0.1 is still in development, some simple errors pop up. |
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 merge! LGTM!
@im-coder-lg thanks so much for helping test!!! I will merge this once CI passes |
This reverts part of the changes introduced in refactor: migrate from argon2 -> @node-rs/argon2 (#4733) Switching to @node-rs/argon2 introduced bugs that we couldn't solve due to limitations in npm. see here #4804 (comment)
* revert: partial revert of 723469a This reverts part of the changes introduced in refactor: migrate from argon2 -> @node-rs/argon2 (#4733) Switching to @node-rs/argon2 introduced bugs that we couldn't solve due to limitations in npm. see here #4804 (comment)
* chore(deps): replace argon2 w/@node-rs/argon2 * refactor: clean up hashPassword functions * refactor(util): pass in process.platform * fix: use correct settings for test-extension Before, it was running into errors with an @types package. Now, we're correctly running `tsc` so it picks up our `tsconfig.json` and we're telling TypeScript to not typecheck our lib and exclude `node_modules`
* revert: partial revert of 723469a This reverts part of the changes introduced in refactor: migrate from argon2 -> @node-rs/argon2 (coder#4733) Switching to @node-rs/argon2 introduced bugs that we couldn't solve due to limitations in npm. see here coder#4804 (comment)
This migrates our hashing password implementation from using
argon2
to@node-rs/argon2
.Fixes #4422
How to Test
release-packages
from Artifactscd
intorelease-packages
tar -xzf code-server*
based on your archhashed-password: "$argon2i$v=19$m=4096,t=3,p=1$cecR+o8tshB6mKzPBUG7fw$w2XFt+Ezn+CjRGTwptsjH3yj72htGLhMc3WdPs7wIOk"
./code-server*/bin/code-server
Tested on
Notes
At first, I ran into some issues with tests because I was overriding
process.platform
and that caused issues with any test files that required@node-rs/argon2
. @code-asher had a good idea to fix this: refactorgetEnvPaths()
to pass inprocess.platform
. That fixed it.Resources