Skip to content

feat: add PDF embedded images extractor#363

Closed
BhakktiGautam wants to merge 1 commit into
Durgeshwar-AI:mainfrom
BhakktiGautam:feature/mime-validation-v2
Closed

feat: add PDF embedded images extractor#363
BhakktiGautam wants to merge 1 commit into
Durgeshwar-AI:mainfrom
BhakktiGautam:feature/mime-validation-v2

Conversation

@BhakktiGautam

Copy link
Copy Markdown

📌 Closes Issue

Closes #330

🐛 Problem

Current validation only checks file extensions. Malicious files renamed as .pdf can bypass validation.

✅ Solution

Implement magic number (MIME type sniffing) validation.

📁 Files Changed

File Change
backend/utils/mime_validator.py New
backend/utils/decorators.py Updated
backend/requirements.txt Updated
backend/blueprints/pdf.py Added decorator
backend/blueprints/image.py Added decorator
backend/blueprints/removebg.py Added decorator
backend/blueprints/pdf_to_docx.py Added decorator
backend/blueprints/docx_to_pdf.py Added decorator

✅ Rule Compliance

  • No data storage
  • No external APIs
  • Pure file manipulation

Request

  • Please add GSSoC label
  • Please add bug, security, level:beginner labels

Ready for review! 🚀

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@BhakktiGautam is attempting to deploy a commit to the Durgeshwar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@BhakktiGautam

Copy link
Copy Markdown
Author

Closing this duplicate. Please review PR #337 instead. 🙏

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] File extension validation can be bypassed with renamed malicious files

1 participant