Skip to content

Vulnerable/Wildcard CORS Policy - #2041

Merged
riteshbonthalakoti merged 3 commits into
riteshbonthalakoti:gssocfrom
ArshVermaGit:main_3
Jun 7, 2026
Merged

Vulnerable/Wildcard CORS Policy#2041
riteshbonthalakoti merged 3 commits into
riteshbonthalakoti:gssocfrom
ArshVermaGit:main_3

Conversation

@ArshVermaGit

Copy link
Copy Markdown

Changes Made:

  • Modified backend/main.py CORS middleware.
  • Replaced allow_methods=["*"] with an explicit list: ["GET", "POST", "PATCH", "OPTIONS"].
  • Replaced allow_headers=["*"] with an explicit list: ["Content-Type", "Authorization", "Accept"].
    By explicitly declaring only the capabilities actually utilized by our frontend client, we massively reduce the API attack surface area. This ensures that even if an attacker manages to hijack an approved origin, their ability to execute destructive, unverified HTTP behaviors or inject malicious headers is structurally blocked by the browser.

Resolved Issue

Resolves #2040

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

@ArshVermaGit is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ArshVermaGit, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 10 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d85241e2-0bfa-4f79-9b8a-32bd2c613e37

📥 Commits

Reviewing files that changed from the base of the PR and between da8faf2 and 1a0f672.

📒 Files selected for processing (2)
  • backend/.env.example
  • backend/main.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ArshVermaGit ArshVermaGit left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ritesh-1918 ! The issue has been resolved. Please review the PR and merge it under GSSoC. Thanks!

@riteshbonthalakoti
riteshbonthalakoti changed the base branch from main to gssoc June 7, 2026 16:04
@riteshbonthalakoti riteshbonthalakoti added gssoc GirlScript Summer of Code gssoc:approved GSSoC Approved PR level:intermediate Intermediate level difficulty quality:clean Clean code quality type:security Security fix or improvement labels Jun 7, 2026
@riteshbonthalakoti

Copy link
Copy Markdown
Owner

Hi @ArshVermaGit! Thanks for the contribution. I have triaged your PR and set it to merge into the gssoc branch.

⚠️ MANDATORY GSSOC ONBOARDING STEPS:
Before your PR points are finalized on the leaderboard, you MUST complete these required steps:

  1. Star this repository: https://github.com/ritesh-1918/HELPDESK.AI (Mandatory)
  2. 👤 Follow the Project Admin: https://github.com/ritesh-1918 (Mandatory)
  3. 💼 Connect on LinkedIn: https://www.linkedin.com/in/ritesh1908/ (Mandatory)

Welcome to the HELPDESK.AI developer family! 🚀💻

@riteshbonthalakoti
riteshbonthalakoti merged commit 1a0f672 into riteshbonthalakoti:gssoc Jun 7, 2026
9 of 10 checks passed
@ArshVermaGit
ArshVermaGit deleted the main_3 branch June 7, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC Approved PR gssoc GirlScript Summer of Code level:intermediate Intermediate level difficulty quality:clean Clean code quality type:security Security fix or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulnerable/Wildcard CORS Policy

2 participants