osuAkatsuki / osuAkatsuki/admin-panel

Operator precedence bug in privilege checks

Open Beginner friendly
#69 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.