RealDevSquad / RealDevSquad/website-backend

User can add restricted roles while adding/removing roles from dashboard site

Open
#1,939 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Issue Description

Users can add any role by modifying the payload while adding groups from the dashboard site.

Expected Behavior

Users should only have the authority to add roles that exist in the database.

Current Behavior

By modifying the payload user can choose any role of their choice. And then it will get applied to them on discord.

Screenshots
Screenshot 2024-03-05 at 11 17 46 PM
Reproducibility
  • This issue is reproducible
  • This issue is not reproducible
Steps to Reproduce
  1. Modify the API response for adding roles
Severity/Priority
  • Critical
  • High
  • Medium
  • Low
Additional Information
Checklist
  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Contributor guide

Open the contributing guide

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 tracing the dashboard API endpoint used for adding or removing roles and follow where the submitted role is accepted before being applied on Discord. Verify the validation against roles in the database, then reproduce the modified-payload case and confirm unauthorized roles are rejected while valid roles still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, authorization, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.