-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
App password command #24317
App password command #24317
Conversation
@SMillerDev please set development status label and milestone :) |
It's that documented somewhere? Without the comment I would never have known. |
d243a2a
to
eeee12a
Compare
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.
Fine by me for a first version!
Thanks for the help @rullzer . Do I need to do anything here? |
https://docs.nextcloud.com/server/20/developer_manual/getting_started/codingguidelines.html#labels |
$output->writeln('<info>The password is not validated so what you provide is what gets recorded in the token</info>'); | ||
|
||
|
||
$token = $this->random->generate(72, ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_DIGITS); |
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.
can we make the magic number 72 a constant somewhere so we use the same length in all code paths?
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.
I'm not sure why it's 72 to begin with, @rullzer any comment on this?
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.
72 was done because of the bcrypt limit of 72 bytes
41962b1
to
6bb7078
Compare
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
92a8099
to
40595f3
Compare
Pushed the fix and resolved a deprecation notice in the command registration |
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.
Tested and works 👍
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
Add a command to generate app passwords. This will make it a lot easier for app developers to do full end-to-end tests and hopefully it'll also benefit some users.
I don't know much about the server code, so please point to other things you guys need in this PR.