Opened 14 years ago
Last modified 11 years ago
#6368 confirmed Bug
Chrome: Insert Image dialog causes extra http request on closing
Reported by: | jpatey@editure.co.uk | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | Cc: |
Description (last modified by )
In chrome an additional request is produced whenever I open the image dialogue and then ok/cancel it.
- Open ckeditor.com/demo and open the developer tools to track requests.
- Click the 'Insert Image' button to display the image preview dialog.
- Click Cancel.
- A request is made relative to the current page location (so the html page ckeditor.com/demo) - The console also displays the warning 'Resource interpreted as image but transferred with MIME type text/html'
It looks like its caused during the dialog cleanup. The <img> tag src attribute is set to ''
in /plugins/image/dialogs/image.js - which causes a relative request.
Browser: chrome 5.0.375.86 OS: Ubuntu 9.04
Change History (9)
comment:1 Changed 14 years ago by
comment:2 Changed 13 years ago by
I can second this. It's killed my csrf-checking because of the extra request. On Chrome/Safari/Webkit it calls the current url expecting an image (but in my case getting text/html). In IE it calls the directory of the current page. (Regardless of OS)
In commit 7176 on svn, this is in plugins/image/dialogs/image.js on line 569. I'm sure there is good reason for this, but it's bad for my site. I commented it out in my source.
Anyone else stumbles on this bug while trying to figure it out: open the source file plugins/image/dialogs/image.js, do a search for element.setAttribute( 'src', ); comment it out or delete it. OR set it to a static image url you know exists and don't mind the request going to.
Due to the custom nature and preference each dev may have (deleting the line or pointing to a static image), I'm not creating a patch for this fix.
comment:3 Changed 13 years ago by
Keywords: | Webkit added |
---|---|
Status: | new → confirmed |
Version: | 3.4.1 → 3.0 |
This is reproducible in all browsers. All return 404 when relative URL is used but only Chrome treats it as potential threat.
Perhaps changing this to some dummy image included in image plugin isn't such a bad idea?
comment:4 Changed 13 years ago by
Keywords: | Webkit removed |
---|
comment:6 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 13 years ago by
Replying to j.swiderski:
Ticket #8602 has proposed fix to this issue.
#8602 has nothing to do with this issue, unfortunately.
comment:8 Changed 11 years ago by
We have another problem concerning this behaviour: #10687. Perhaps both can be fixed with changing mime type to application/javascript or text/javascript - http://stackoverflow.com/questions/3467404/chrome-says-resource-interpreted-as-script-but-transferred-with-mime-type-text
Oops I screwed up wiki formatting Last line should read:The <img> tag src attribute is set to EMPTY_STRING in /plugins/image/dialogs/image.js - which causes a relative request.