-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
image2 add-on does not handle image URLs containing queryString (http 403 error) #3394
Comments
I can confirm the issue. It's present only in dialog, when fetching image preview. The fix seems rather easy: before adding query string, check if there isn't one already. |
What is the reason for adding the query string anyway? I assume it's cache-related, but why would it be needed in this particular case? Can the code that adds the query string be removed completely? |
The query string is added to force an update of image preview. I'm not sure if it's really needed, yet it seems to be in image plugin from the very beginning. Probably some browsers had issues with updating image preview back then. |
Tomas, we just upgraded to 4.13.1 and this bug is still there. Do you think you could remove the unnecessary append to the URL -- or, at least check if there is already a query string in the URL (i.e. search for "?") and if so, use "&" instead of "?". |
* Fix missing check of the query string presence in the src of the image before adding a random query string value for cache purpose * fixes ckeditor#3394
@Comandeer I happened to have this exact same issue when working on a custom uploader widget and testing it with images, so I opened a PR for fixing it. However it's really my first contrib on ckeditor, so might need a bit of help for providing a test to have it merged. |
* Fix missing check of the query string presence in the src of the image before adding a random query string value for cache purpose * fixes ckeditor#3394
Closed in #5153 |
1 similar comment
Closed in #5153 |
Type of report
Bug
Provide detailed reproduction steps (if any)
Expected result
HTTP 403 error
Actual result
No error
Other details
The offending code in Image2 is this:
The text was updated successfully, but these errors were encountered: