Repository navigation
Fixed Panorama Public reviewer passwords failing the Good password ru… - #683
Merged
vagisha merged 3 commits intoOct 29, 2026
Merged
Conversation
…le at login * CopyExperimentFinalTask.createPassword now keeps a generated password only if every PasswordRule accepts it. The Good rule rejects a three-character sequence from the email address that the Strong rule accepts, so a reviewer could be forced to change the emailed password at first login * Added CopyExperimentFinalTask.TestCase and registered it in PanoramaPublicModule.getUnitTests Co-Authored-By: Claude <noreply@anthropic.com>
labkey-jeckels
approved these changes
Oct 28, 2026
| */ | ||
| private static String createPassword(User user, Supplier<String> generator) | ||
| { | ||
| while (true) |
Contributor
There was a problem hiding this comment.
Consider breaking out with an exception if this fails, say, 100 times.
Collaborator
Author
There was a problem hiding this comment.
Done. createPassword now throws a UserManagementException after 100 attempts.
* createPassword throws IllegalStateException when none of 100 generated passwords passes every PasswordRule * Added CopyExperimentFinalTask.TestCase.testCreatePasswordStopsAfterMaxAttempts Co-Authored-By: Claude <noreply@anthropic.com>
…d to UserManagementException * createPassword throws SecurityManager.UserManagementException, with the reviewer email, when none of 100 generated passwords passes every PasswordRule. assignReviewer wraps it as "Error creating a new account for reviewer" * testCreatePasswordStopsAfterMaxAttempts expects UserManagementException Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Changes
CopyExperimentFinalTask.createPasswordkeeps a generated password only if everyPasswordRule(Good and Strong) accepts it, so the password is valid whichever rule the site uses.Supplier<String>so the unit test can supply fixed passwords.Tests
CopyExperimentFinalTask.TestCase- - checks thatcreatePasswordskips a password that passes only the Good rule and one that passes only the Strong rule.Co-Authored-By: Claude noreply@anthropic.com