osuAkatsuki / osuAkatsuki/admin-panel
Operator precedence bug in privilege checks
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
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
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.
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.
Assessment
- Tech stack
- php
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100