Open
Bug 1459874
Opened 6 years ago
Updated 2 years ago
support canceling auth in webrequest
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(Not tracked)
REOPENED
People
(Reporter: frandarko, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
3.09 KB,
application/x-7z-compressed
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180427210249 Steps to reproduce: Create a complement, based on an example of Mozilla "webextensions-examples" called "stored-credentials", which if you try to put invalid credentials a second time, shows you the error page "401 authentication required" sent from the server. Actual results: The browser showed a blank page, with a blank body and blank header. Expected results: It should have shown the page that provides the server "401 authentication required", so I can act in a certain way, depending on the content of this page.
Attachment #8973968 -
Attachment is obsolete: true
Example of Mozilla changed so that it always cancels basic authentication.
Updated•6 years ago
|
Updated•6 years ago
|
Flags: needinfo?(mixedpuppy)
Comment 2•6 years ago
|
||
Returning {cancel:true} from onAuthRequired cancels the channel request, not the authentication prompt. It is not the same as using the cancel button on the auth dialog. On a fresh profile without any extension installed, going to http://httpbin.org/ and using the basic auth test, if I cancel (the dialog) I get a blank page.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(mixedpuppy)
Resolution: --- → INVALID
Good morning Shane, My add-on performs the action that a user would do, either enter the credentials or cancel in case the first request has been unsuccessful. Once the server shows me page 401, I detect its content and act accordingly. The website "http://httpbin.org/" is a dummy site. It is not a real environment that returns a page 401 from the server. It does not work for me. The same webExtension code, made through chrome callbacks, returns the 401 error page from the server. What is different if it is the same code? The flow of windows must be the same programmatically and graphically to respect the W3C. Also, showing a blank page, which is quite restrictive from Firefox, does not help the user or the programmer. How could I programmatically perform to show page 401? Thank you.
Flags: needinfo?(mixedpuppy)
Goog morning, effectively from the url: http://httpbin.org/basic-auth/frank/mypass I get a blank page. Interestingly from chrome I get: "This page does not work If the problem persists, contact the owner of the website. HTTP ERROR 401 " and from Iexplore, a blank page. It is curious to see how a user decides to cancel a request and gets a nice, beautiful and informative blank page. I imagine it in the big multinationals of our clients. thanks
Comment 5•6 years ago
|
||
(In reply to Fran from comment #3) > How could I programmatically perform to show page 401? You could redirect to a page in the extension. For now I'll reopen and change the bug to enable the ability to cancel the auth (same operation that happens on user cancel) rather than canceling the request. However, I'm not sure if that will result in the server 401 page being shown.
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(mixedpuppy)
Priority: -- → P3
Resolution: INVALID → ---
Summary: Basic authentication redirects a blank page when the request is canceled programmatically from my add-on. → support canceling auth in webrequest
Hi, I put a link with a tipical basic autentication: https://jigsaw.w3.org/HTTP/Basic/ thanks
Updated•6 years ago
|
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•