Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: simplify mime-type checks to support jpg and other image formats #2401

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

Koc
Copy link
Collaborator

@Koc Koc commented Nov 6, 2024

This PR should fix #2399

TODO:

  • deeper manual testing
  • check tests failures

@Koc Koc force-pushed the fix/fix-image-mime-type-checks branch from 40010de to fa0067f Compare November 6, 2024 22:50
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@39bd5df). Learn more about missing BASE report.
Report is 75 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2401   +/-   ##
=======================================
  Coverage        ?   42.86%           
  Complexity      ?      854           
=======================================
  Files           ?       72           
  Lines           ?     3201           
  Branches        ?        0           
=======================================
  Hits            ?     1372           
  Misses          ?     1829           
  Partials        ?        0           

@Koc Koc requested a review from Chartman123 November 6, 2024 22:56
@Chartman123 Chartman123 added bug Something isn't working 3. to review Waiting for reviews labels Nov 7, 2024
@Chartman123
Copy link
Collaborator

/backport to stable4

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Nov 7, 2024
@Chartman123
Copy link
Collaborator

@Koc I think we need some adjustments in the backport as we have the duplicated endpoints there.

@Chartman123 Chartman123 requested a review from susnux November 7, 2024 20:46
@Chartman123 Chartman123 added this to the 5.0 milestone Nov 7, 2024
@Koc
Copy link
Collaborator Author

Koc commented Nov 19, 2024

I've re-tested it one more time:

Created a form with file question type. Allowed images + pdf.

  1. png - uploaded
  2. jpg - uploaded
  3. pdf - uploaded
  4. sql - not uploaded
  5. zip - not uploaded

@Chartman123 I can backport changes manualy once we merged this one.

Let's merge?

@Chartman123 Chartman123 merged commit f6c9442 into main Nov 19, 2024
48 checks passed
@Chartman123 Chartman123 deleted the fix/fix-image-mime-type-checks branch November 19, 2024 18:24
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Nov 19, 2024
Copy link

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working feedback-requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing common image mimetypes from file upload restricted for image type
2 participants