Operator precedence bug in privilege checks
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start by reading inc/Do.php at lines 155, 217, and 1055, along with the surrounding privilege checks and updateBanBancho() calls. Verify the operator grouping at each location and confirm that the second argument reflects the intended privilege-bit check rather than always evaluating to false.
Written by the indexing model from the issue text.
Description
PHP's == binds tighter than &, so $_POST["priv"] & Privileges::UserPublic == 0 evaluates as $_POST["priv"] & (Privileges::UserPublic == 0). The second argument to updateBanBancho() is always 0/false.
inc/Do.php, lines 155, 217, 1055
- Dominant language
- PHP
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 osuAkatsuki/admin-panel
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
osuAkatsuki/admin-panel#68 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
osuAkatsuki/admin-panel#67 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
osuAkatsuki/admin-panel#66 ·
All issues in osuAkatsuki/admin-panel
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 ·