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(preview): check mime type before processing with Imagick #44710

Merged
merged 1 commit into from
May 15, 2024

Conversation

pulsejet
Copy link
Member

@pulsejet pulsejet commented Apr 8, 2024

No description provided.

@pulsejet pulsejet added 3. to review Waiting for reviews security php Pull requests that update Php code labels Apr 8, 2024
@pulsejet pulsejet added this to the Nextcloud 30 milestone Apr 8, 2024
@pulsejet pulsejet requested review from nickvergessen, skjnldsv, come-nc and a team April 8, 2024 02:37
@nickvergessen nickvergessen removed the request for review from a team April 8, 2024 03:05
@pulsejet pulsejet force-pushed the pulsejet/imagick-check-type branch from fb5711d to ffe31a5 Compare April 8, 2024 03:18
@pulsejet pulsejet force-pushed the pulsejet/imagick-check-type branch from ffe31a5 to 0e612ae Compare April 8, 2024 07:55
@pulsejet
Copy link
Member Author

pulsejet commented Apr 8, 2024

I made one change: the default behavior of the Bitmap class is now to match nothing rather than everything. As a result, any derived classes will not match anything unless getAllowedMimeTypes is defined (the breaking change is intentional). Let me know if this isn't desirable for any strong reason.

lib/private/Preview/Bitmap.php Show resolved Hide resolved
lib/private/Preview/Bitmap.php Show resolved Hide resolved
lib/private/Preview/IMagickSupport.php Outdated Show resolved Hide resolved
lib/private/Preview/Bitmap.php Outdated Show resolved Hide resolved
@pulsejet pulsejet force-pushed the pulsejet/imagick-check-type branch 2 times, most recently from c46ecd6 to 31fc099 Compare April 8, 2024 08:30
@pulsejet pulsejet force-pushed the pulsejet/imagick-check-type branch from 31fc099 to 5d4d84b Compare April 8, 2024 09:17
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
@pulsejet pulsejet force-pushed the pulsejet/imagick-check-type branch from 5d4d84b to 4ab40e3 Compare April 8, 2024 17:22
@pulsejet
Copy link
Member Author

Bump

@pulsejet
Copy link
Member Author

Bump (2)

@nickvergessen
Copy link
Member

yeah, there was a freeze recently for updates, so this could not proceed with all necessary energy

@nextcloud nextcloud deleted a comment from github-actions bot Apr 30, 2024
@nickvergessen nickvergessen self-assigned this May 2, 2024
@nickvergessen nickvergessen merged commit bd6989d into master May 15, 2024
154 of 157 checks passed
@nickvergessen nickvergessen deleted the pulsejet/imagick-check-type branch May 15, 2024 20:13
@nickvergessen
Copy link
Member

/backport to stable29

@nickvergessen
Copy link
Member

/backport to stable28

@nickvergessen
Copy link
Member

/backport to stable27

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 feature: previews and thumbnails feedback-requested php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants