Skip to content

[#74399] No max limit for password length #22988

Merged
mrmir merged 3 commits intorelease/17.4from
bug/74399-no-max-limit-for-password-length
Apr 30, 2026
Merged

[#74399] No max limit for password length #22988
mrmir merged 3 commits intorelease/17.4from
bug/74399-no-max-limit-for-password-length

Conversation

@mrmir
Copy link
Copy Markdown
Contributor

@mrmir mrmir commented Apr 29, 2026

Ticket

https://community.openproject.org/wp/74399

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@mrmir mrmir marked this pull request as ready for review April 29, 2026 11:02
Comment thread app/models/setting.rb
Comment on lines +94 to +100
validates :value,
numericality: {
only_integer: true,
greater_than_or_equal_to: 1,
less_than_or_equal_to: 128,
if: ->(setting) { setting.name == "password_min_length" }
}
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.

I’m torn, honestly, between your really simple ad-hoc solution, and the magic numbers duplication. A more generic validation retrieving allowed values in the definition would be great in this regard.

I’m wondering if it’s worth the extra mile.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call, I tried to do it via a constant now. Does that work?

Copy link
Copy Markdown
Contributor

@dfriquet dfriquet left a comment

Choose a reason for hiding this comment

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

👍

@mrmir mrmir merged commit 36b58f1 into release/17.4 Apr 30, 2026
17 checks passed
@mrmir mrmir deleted the bug/74399-no-max-limit-for-password-length branch April 30, 2026 14:09
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants