Uh oh!
There was an error while loading. Please reload this page.
refactor: migrate from argon2 -> @node-rs/argon2 - #4733
Conversation
e52eb94 to
d796af5CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d796af5 to
698c46fCompareCodecov 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.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
698c46f to
e888281Compare✨ Coder.com for PR #4733 deployed! It will be updated on every commit.
|
im-coder-lg
commented
Jan 13, 2022
@yisibl any ideas why the artifact failed? |
yisibl
commented
Jan 13, 2022
What is the actual glibc version in Docker? |
Brooooooklyn
commented
Jan 13, 2022
And I'll draft a patch release after |
yisibl
commented
Jan 13, 2022
Yeah, I see |
im-coder-lg
commented
Jan 13, 2022
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. |
im-coder-lg
commented
Jan 13, 2022
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 |
Brooooooklyn
commented
Jan 13, 2022
Upgrade to |
jsjoeio
commented
Jan 13, 2022
@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
02944b3Comparejsjoeio
commented
Jan 13, 2022
This should fix the audit/code scanning CI failing (I'll rebase once merged): #4742 |
im-coder-lg
commented
Jan 14, 2022
Testing this now! |
jsjoeio
commented
Jan 14, 2022
😅 I wish I had a good answer for that... |
jsjoeio
commented
Jan 14, 2022
@code-asher brought up a good point. our e2e tests run on Linux so those are passing which means this is good on Linux. |
jsjoeio
commented
Jan 14, 2022
@im-coder-lg any updates? |
jsjoeio
commented
Jan 14, 2022
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. |
im-coder-lg
commented
Jan 14, 2022
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. |
jsjoeio
commented
Jan 14, 2022
No worries at all. What I did was upload the |
jsjoeio
commented
Jan 14, 2022
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 |
im-coder-lg
commented
Jan 15, 2022
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. |
im-coder-lg
commented
Jan 15, 2022
LOLZ, all I needed to test was the |
im-coder-lg
commented
Jan 15, 2022
This absolutely works. I am testing this once again with the hashed password and maybe again on armv7l. |
im-coder-lg
commented
Jan 15, 2022
I can say this works successfully, although 4.0.1 is still in development, some simple errors pop up. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jsjoeio
commented
Jan 18, 2022
@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
argon2to@node-rs/argon2.Fixes#4422
How to Test
release-packagesfrom Artifactscdintorelease-packagestar -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-serverTested on
Notes
At first, I ran into some issues with tests because I was overriding
process.platformand 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