Skip to content

Fixed Panorama Public reviewer passwords failing the Good password ru… - #683

Merged
vagisha merged 3 commits into
release26.7-SNAPSHOTfrom
26.7_fb_reviewer-password-site-rule
Oct 29, 2026
Merged

vagisha merged 3 commits into
release26.7-SNAPSHOTfrom
26.7_fb_reviewer-password-site-rule

Conversation

@vagisha

@vagisha vagisha commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Rationale

  • Reviewer accounts could be forced to change the emailed password at first login. Generated passwords were checked only against the Strong rule, but login checks the site's rule, and the Good rule rejects some passwords that Strong accepts.

Changes

  • CopyExperimentFinalTask.createPassword keeps a generated password only if every PasswordRule (Good and Strong) accepts it, so the password is valid whichever rule the site uses.
    • The generator is passed in as a Supplier<String> so the unit test can supply fixed passwords.

Tests

  • CopyExperimentFinalTask.TestCase - - checks that createPassword skips a password that passes only the Good rule and one that passes only the Strong rule.

Co-Authored-By: Claude noreply@anthropic.com

…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>
*/
private static String createPassword(User user, Supplier<String> generator)
{
while (true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider breaking out with an exception if this fails, say, 100 times.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. createPassword now throws a UserManagementException after 100 attempts.

vagisha and others added 2 commits October 29, 2026 11:44
* 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>
@vagisha
vagisha merged commit 8d39057 into release26.7-SNAPSHOT Oct 29, 2026
6 checks passed
@vagisha
vagisha deleted the 26.7_fb_reviewer-password-site-rule branch October 29, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants