Skip to content
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

Passwortregeln als HTML-Attribute #5257

Merged
merged 5 commits into from
Jul 21, 2022
Merged

Passwortregeln als HTML-Attribute #5257

merged 5 commits into from
Jul 21, 2022

Conversation

gharlan
Copy link
Member

@gharlan gharlan commented Jul 21, 2022

Der PR setzt an den Feldern für neue Userpasswörter die Attribute minlength, maxlength und passwordrules.
Die werden generiert über eine neue Methode getHtmlAttributes in der Password-Policy-Klasse.

whatwg/html#3518
https://www.scottbrady91.com/authentication/perfecting-the-password-field-with-the-html-passwordrules-attribute

Das wird von 1Password zum Beispiel bereits beachtet beim Generierung von Passwörtern.

$allowed = $mapping;
foreach ($mapping as $rexKey => $htmlKey) {
if (($this->options[$rexKey]['min'] ?? 0) > 0) {
$rules[] = 'required: '.$htmlKey;
Copy link
Member Author

Choose a reason for hiding this comment

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

Im passwordrules-Attribute kann man anscheinend leider nur sagen, welche Zeichenarten erforderlich sind, aber nicht wie viele jeweils.

@gharlan gharlan requested a review from staabm July 21, 2022 18:49
@gharlan gharlan added this to the REDAXO 5.14 milestone Jul 21, 2022
# Conflicts:
#	redaxo/src/core/pages/profile.php
#	redaxo/src/core/pages/setup.step5.php
@gharlan gharlan added the automerge Automatisch PR rebasen und mergen label Jul 21, 2022
@kodiakhq kodiakhq bot merged commit ce95442 into main Jul 21, 2022
@kodiakhq kodiakhq bot deleted the password-rules branch July 21, 2022 21:30
@rex-bot rex-bot removed the automerge Automatisch PR rebasen und mergen label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants