Closed Bug 682294 Opened 13 years ago Closed 8 years ago

Opening a page which we can't read should display an error page

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: bbondy, Assigned: jdai)

References

Details

(Whiteboard: [tw-dom] btpp-active)

Attachments

(2 files, 2 obsolete files)

Reproduced on Windows XP, Windows 7, and Ubuntu.

Steps to Reproduce:
1. Create an .html file on your C:\ or a UNC path.
2. Remove read permissions from the file.
3. Try to load the file:// in Firefox.

Actual Results:  
Opens a blank Mozilla page with no data.

Expected Results:  
Some kind of an error page should be displayed.
Is this the usual issue with nsFileChannel::AsyncOpen throwing?
Whiteboard: DUPEME
I haven't looked at where the error is in code yet, but I'm posting based on Bug 263816.

You had mentioned in that bug:

> networking in Mozilla handles all interaction between the
layout engine and the outside world, INCLUDING local file access.  The local
file case sounds like networking is not returning the right errors to the layout
code.
OK.  Worth checking whether we end up with an exception from AsyncOpen or just an unknown error code in nsDocShell::EndPageLoad.
Assignee: netzen → nobody
Whiteboard: DUPEME → DUPEME[necko-backlog]
nsDocShell gets a error code NS_ERROR_FILE_ACCESS_DENIED (0x80520015) bt does not display an error code for it.
This is docShell bug
Component: Networking: File → Document Navigation
> nsDocShell gets a error code NS_ERROR_FILE_ACCESS_DENIED (0x80520015)

Via EndPageLoad or AsyncOpen throwing?

> bt does not display an error code for it.

You mean doesn't display an error page?
Flags: needinfo?(dd.mozilla)
(In reply to Boris Zbarsky [:bz] from comment #5)
> > nsDocShell gets a error code NS_ERROR_FILE_ACCESS_DENIED (0x80520015)
> 
> Via EndPageLoad or AsyncOpen throwing?
> 

EndPageLoad is called

> > bt does not display an error code for it.
> 
> You mean doesn't display an error page?

Sorry, it doesn't display an error page.
Flags: needinfo?(dd.mozilla)
Whiteboard: DUPEME[necko-backlog] → [tw-dom]
Assignee: nobody → jdai
I've verified that the error page shows up fine.
Hi Boris, may I have your review? Thank you.
Attachment #8738498 - Flags: review?(bzbarsky)
Comment on attachment 8738498 [details] [diff] [review]
Bug 682294 - Add an error page for file access denied. v1

r=me, but it would be nice in the future to not mix whitespace cleanup in with substantive changes...
Attachment #8738498 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #9)
> Comment on attachment 8738498 [details] [diff] [review]
> Bug 682294 - Add an error page for file access denied. v1
> 
> r=me, but it would be nice in the future to not mix whitespace cleanup in
> with substantive changes...

Sorry, it's my fault. I would like to separate whitespace cleanup to another patch and send a review again. Thank you for reviewing my patch.
Attachment #8738498 - Attachment is obsolete: true
Attachment #8738581 - Flags: review?(bzbarsky)
Attachment #8738582 - Flags: review?(bzbarsky)
Comment on attachment 8738581 [details] [diff] [review]
Part 1: Bug 682294 - Add an error page for file access denied. (Final) r=bz

r=me; it really was ok to just split up the existing reviewed patch without asking for more review... ;)
Attachment #8738581 - Flags: review?(bzbarsky) → review+
Comment on attachment 8738582 [details] [diff] [review]
Part 2: Bug 682294 - Remove redundent trailing spaces.

"redundant", in the commit message.
Attachment #8738582 - Flags: review?(bzbarsky) → review+
Attachment #8738581 - Attachment description: Part 1: Bug 682294 - Add an error page for file access denied. v2 → Part 1: Bug 682294 - Add an error page for file access denied. (Final) r=bz
Keywords: checkin-needed
Whiteboard: [tw-dom] → [tw-dom] btpp-active
https://hg.mozilla.org/mozilla-central/rev/b486146cd3fb
https://hg.mozilla.org/mozilla-central/rev/16fab0a75b35
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.