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 #620: remove problematic base64 encoded images #664

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

Basssiiie
Copy link
Contributor

Hello,

This PR should fix issue #620 we submitted earlier this year and should make the image cropper more compatible with a stricter Content Security Policy. It removes all problematic hardcoded usages of base64/data: urls and replaces them with permitted alternatives.

If there are any questions, feel free to ask. Thank you for your time! 🙂

@Mawi137
Copy link
Owner

Mawi137 commented Dec 11, 2024

Hi

That's indeed a good solution to work around the base64 issue.
Instead of parsing the base64 string and converting it to a byte array in code each time, can't the Blob be created from an int array that is provided? Like that it doesn't have to process that string every time.

@Basssiiie
Copy link
Contributor Author

@Mawi137 Thanks for the quick reply. I have moved the blob creation around the initial array. I've tested it as well and it all seems to work properly. 🙂

@Basssiiie
Copy link
Contributor Author

Hey @Mawi137, hope you had a happy holidays and pleasant new year. Have you had a chance yet to look at the updated chances, by any chance?

Looking forward to hearing from you and thank you for your time. 🙂

@Mawi137
Copy link
Owner

Mawi137 commented Jan 6, 2025

Happy new year to you too ;)
Sorry for the wait, I'll create a new release with this.

@Mawi137 Mawi137 merged commit 81a44a9 into Mawi137:master Jan 6, 2025
1 check passed
@Mawi137
Copy link
Owner

Mawi137 commented Jan 6, 2025

Released in version 9.1.0.

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.

2 participants