Skip to content

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

Merged
Chartman123 merged 1 commit intomainfrom
fix/fix-image-mime-type-checks
Nov 19, 2024
Merged

fix: simplify mime-type checks to support jpg and other image formats#2401
Chartman123 merged 1 commit intomainfrom
fix/fix-image-mime-type-checks

Conversation

@Koc
Copy link
Copy Markdown
Collaborator

@Koc Koc commented Nov 6, 2024

This PR should fix #2399

TODO:

  • deeper manual testing
  • check tests failures

…2399

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the fix/fix-image-mime-type-checks branch from 40010de to fa0067f Compare November 6, 2024 22:50
@codecov
Copy link
Copy Markdown

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
Copy Markdown
Collaborator

/backport to stable4

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Nov 7, 2024
@Chartman123
Copy link
Copy Markdown
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
Copy Markdown
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
@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
@github-actions
Copy link
Copy Markdown
Contributor

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