Uh oh!
There was an error while loading. Please reload this page.
Allow admin to create users without password by sending mail automatic… - #8856
Conversation
| throw new OCSException('To send a password link to the user an email address is required.', 108); | ||
| } | ||
| $password = $this->secureRandom->generate(30); |
There was a problem hiding this comment.
30?!? Don't overcomplicate things 😅
There was a problem hiding this comment.
But... that is only 1532495540865888858358347027150309183618739122183602176 possibilities!
There was a problem hiding this comment.
X)
Do we want to be secure or not!!?? :D
7559c7d to
73682c2CompareCodecov Report
@@ Coverage Diff @@## master #8856 +/- ##
============================================
- Coverage 51.88% 6.85% -45.03% - Complexity 25269 25273 +4
============================================
Files 1603 1603 Lines 94878 94899 +21 Branches 1388 1388 ============================================
- Hits 49229 6508 -42721 - Misses 45649 88391 +42742
|
73682c2 to
3bba48dCompare47bae0c to
c3f9c7eCompare| $password = $this->secureRandom->generate(10); | ||
| // Make sure we pass the password_policy | ||
| $password .= $this->secureRandom->generate(2, '$!.,;:-~+*[]{}()'); |
There was a problem hiding this comment.
well this is only 'kind of' true. We don't know if this will pass the password policy test because we don't know what it is set to.
There was a problem hiding this comment.
Nothing you can fix here. But still
There was a problem hiding this comment.
I used old code, so I'm to blame here :D
To be fair, the goal is to create a secure password that no one will know about since the user will receive a mail to reset it. I suggest we remove the special char part and only use a 15 length generation.
There was a problem hiding this comment.
Then this might fail hard when using the password_policy app ;) But like I said fine by me. Lets do this for now.
| * @throws OCSException | ||
| */ | ||
| public function addUser(string $userid, string $password, array $groups = []): DataResponse { | ||
| public function addUser(string $userid, string $password = '', $email='', array $groups = []): DataResponse { |
02f1087 to
bcca3e0Compare…ally Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
bcca3e0 to
41b690eCompareskjnldsv
commented
Mar 23, 2018
I think the failure is unrelated! |
…ally
Required by #8824