Closed
Bug 176502
Opened 22 years ago
Closed 22 years ago
image.src throws exception if src is local path ('C:\xxx\sss.jpg')
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: jessul, Assigned: jst)
References
Details
Attachments
(1 file)
253 bytes,
text/html
|
Details |
In IE there are no problem, but i don´t now if this is by security, and the error comes from microsoft ;)
Comment 1•22 years ago
|
||
Browser, not engine ---> DOM Level 0 jessul@mixmail.com: 1. What build ID of Mozilla are you using? Please include that in any bug report. In the future, please use the Bugzilla Helper for reporting bugs: http://www.mozilla.org/quality/help/bug-form.html (among other things, it automagically adds your BuildID) 2. What is the exception that is thrown? 3. We cannot investigate this bug without a reduced testcase. I will attach one below, but it does not show any bug that I can see - Please respond to 1. & 2. by entering text in the "Additional Comments" box and hitting the "Commit" button. Please attach any testcase via the "Create a New Attachment" link above. Thanks -
Assignee: rogerl → jst
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → desale
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
The reduced testcase I created contains an image element using the non-existent path given in the report. I used the file:/// prototcol, and used forward slashes, not the backward slashes given in the report. <img src="file:///C:/xxx/sss.jpg"> With this image, I see no exceptions in Mozilla trunk 20021015xx on WinNT.
Comment 4•22 years ago
|
||
a) You can't use backward slashes (only in the URL Bar) b) You can't link from a Http:// document to a file:// URL (blocked from the security manager) This bug report is invalid. No build ID, what for an exception, no testacse... -> invalid Please roepen if you see this with mozilla 1.2b or later and a) and b) is not true
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Then this is the case b) Matti, I try to open a image file from a URL with a value that I get from a <input type=file> tag. I use mozilla 1.0 and win 98. the test case is: <html> <head> </head> <body> <script languagejavascript> var img = new Image(); img.src = "C:\WINDOWS\Escritorio\fondo_590x30_01.gif"; </script> </body> </html> In the Javascript console appears: Error: uncaught exception: [Exception... "Component returned failure code: 0x804b0012 [nsIDOMHTMLImageElement.src]" nsresult: "0x804b0012 (<unknown>)" location: "JS frame :: file:///C:/WINDOWS/Escritorio/NoName(1).html :: <TOP_LEVEL> :: line 7" data: no]
Again, documents received from the web (via http://, for example) are not allowed to read files via file:// protocol, as it has no use for normal browsing and is a hackers' loophole at the same time. verified invalid.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•