LengthValidator should use mb_strlen instead of strlen
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Open lib/Validator/LengthValidator.php at the linked line and inspect how password length is calculated. Verify the behavior against the issue's ASCII and Chinese examples, then confirm that multibyte characters are counted as intended.
Written by the indexing model from the issue text.
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Code:
Sample:
<?php
$a = '12345';
$b = '密码密码';
var_dump(
strlen($a),
strlen($b),
mb_strlen($a),
mb_strlen($b),
);
Output:
int(5)
int(12)
int(5)
int(4)
- Dominant language
- PHP
- Stars
- 39
- Forks
- 27
- Avg merge
- 1h 36m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/password_policy
-
0. Needs triage bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
nextcloud/password_policy#926 ·
-
0. Needs triage bug
Difficulty 3/5 1-2 days Newbie friendliness 64/100
nextcloud/password_policy#925 · 1 comment ·
-
0. Needs triage bug
Difficulty 3/5 1-2 days Newbie friendliness 50/100
nextcloud/password_policy#924 ·
-
1. to develop enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
nextcloud/password_policy#912 ·
-
0. Needs triage bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nextcloud/password_policy#910 · 4 comments ·
All issues in nextcloud/password_policy
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·