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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Basssiiie
Copy link

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
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. 🙂

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