Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement #4 - fix password via CLI #5

Merged
merged 1 commit into from Mar 6, 2019

Conversation

Projects
None yet
5 participants
@icebob
Copy link
Contributor

icebob commented Mar 5, 2019

Add --password=123456 CLI argument to use fix password instead of random.

@kylecarbs Currently I'm on Windows so I can't test it but I hope the code is correct. Maybe could you try it?

@icebob icebob requested review from code-asher and kylecarbs as code owners Mar 5, 2019

@@ -26,6 +26,7 @@ export class Entry extends Command {
version: flags.version({ char: "v" }),
"no-auth": flags.boolean({ default: false }),
"allow-http": flags.boolean({ default: false }),
password: flags.string(),

This comment has been minimized.

@kylecarbs

kylecarbs Mar 5, 2019

Member

We could generate the password here and add it as a default. What do you think?

This comment has been minimized.

@andreimc

andreimc Mar 6, 2019

@kylecarbs for non interactive env's a flag should be provided I think

This comment has been minimized.

@icebob

icebob Mar 6, 2019

Author Contributor

@kylecarbs Maybe, but in this case, code-server --help will print always a random password as a default value for --password argument, won't it?

This comment has been minimized.

@kylecarbs

kylecarbs Mar 6, 2019

Member

Ah thats correct. I agree.

@andreimc
Copy link

andreimc left a comment

👍 for this I was thinking of adding it, it’s needed

chars.push(possible[Math.floor(Math.random() * possible.length)]);
let password = flags["password"];
if (!password) {
// Generate a random password

This comment has been minimized.

@nhooyr

nhooyr Mar 6, 2019

Collaborator

Unrelated issue but this needs to be changed. The password should generated from a CPRNG.

This comment has been minimized.

@icebob

icebob Mar 6, 2019

Author Contributor

This PR is only related to adding a static password feature, not changing original password generation method.

This comment has been minimized.

@Multishifties

Multishifties Mar 6, 2019

Contributor

For those reading this thread, aforementioned issue is located at #26

@kylecarbs kylecarbs merged commit 3fbdb2e into codercom:master Mar 6, 2019

@icebob icebob referenced this pull request Mar 6, 2019

Closed

Fix password feature #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.