Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Fixed security#3345

Open
Originalckjha wants to merge 2 commits into
ayush-that:mainfrom
Originalckjha:main
Open

Fixed security#3345
Originalckjha wants to merge 2 commits into
ayush-that:mainfrom
Originalckjha:main

Conversation

@Originalckjha

@Originalckjha Originalckjha commented Apr 16, 2026

Copy link
Copy Markdown

🛠️ Fixes Issue

Fixes: #<issue_number>

👨‍💻 Description

What does this PR do?

  • Briefly describe the feature or bug fix you've implemented.
  • Highlight any major changes or added functionality.
  • Mention how it enhances the project.

📄 Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (adds or updates related documentation)

📷 Screenshots/GIFs (if any)

Include screenshots or GIFs to demonstrate your changes

✅ Checklist

  • I am a participant of GSSoC-ext.
  • I have followed the contribution guidelines of this project.
  • I have made this change from my own.
  • I have taken help from some online resources.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added documentation to explain my changes.

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

🤝 GSSoC Participation

  • This PR is submitted under the GSSoC program.
  • I have taken prior approval for this feature/fix.

claude and others added 2 commits April 16, 2026 17:41
Security:
- Add in-memory rate limiter middleware (100 req/15 min per IP) on all /api routes
- Restrict CORS to configured allowed origins with explicit method/header allowlist
- Set X-Content-Type-Options, X-Frame-Options, X-XSS-Protection response headers
- Enforce 10 KB JSON body size limit to block large-payload attacks
- Validate and restrict file uploads to JPEG/PNG/WebP/GIF, max 5 MB
- Validate MongoDB ObjectId format before hitting the DB in getBlog
- Strip internal error objects from all 500 responses (no stack traces to client)
- Fix Flask running with debug=True; now reads FLASK_DEBUG env var (defaults off)

Validation & correctness:
- Add input length and format validation in all four controllers
- Add duplicate-email check in newsletter subscription (returns 409)
- Add model-level maxlength constraints to match controller limits
- Add lowercase + unique index to Newsletter email field
- Fix newsletter controller returning wrong "Contact form" success message
- Replace placeholder getContact / getNewsletter stubs with 405 responses

Performance:
- Add cursor-based pagination (page/limit) to getAllBlog and getAllFeedback
- Run DB count and find queries concurrently with Promise.all
- Fire email sends asynchronously so they don't block HTTP responses

Frontend:
- Remove duplicate AOS CSS import (was loaded 3 times)
- Fix broken backslash path in preloader.css link
- Remove JS comment from <script type="application/ld+json"> (invalid JSON)
- Remove duplicate <meta name="description"> tag
- Add loading="lazy" to all below-the-fold images
- Add missing alt text to hero image and decorative images
- Remove two debug console.log calls left in subscribe.js

https://claude.ai/code/session_01WYySXKUwHPqy48PB1b7PAa
Improve security, performance, and code quality across the stack
@github-actions

Copy link
Copy Markdown

Thank you for submitting your chaotic pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our chaotic CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer from FinVeda team will review it as soon as possible. We appreciate your support in making this project better

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants