Closed Bug 273285 Opened 21 years ago Closed 20 years ago

XML-RPC does not report error when HTTP authentification fails

Categories

(Core :: XML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: fabien, Assigned: fabien)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2) XML-RPC authentification failure handling doesn't work properly. Basically when the user supplies a wrong login&password, the onError method of the nsIXmlRpcClientListener interface never gets called. A separate issue is that even if there hasn't been actually any result sent back, the onResult method of the nsIXmlRpcClientListener interface gets called anyway. Activating debug for the module gives. -- XML-RPC client -- : asyncCall -- XML-RPC client -- : Arguments: 2 -- XML-RPC client -- : Request: <?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>fact</methodName><params><param><value><i4>2</i4></value></param></params></methodCall> -- XML-RPC client -- : Exception in listener.onError: ReferenceError: ctxt is not defined -- XML-RPC client -- : Start Request -- XML-RPC client -- : Stop Request -- XML-RPC client -- : Parse finished -- XML-RPC client -- : Result: null -- XML-RPC client -- : Exception in listener.onResult: [Exception... "'[JavaScript Error: "result has no properties" {file: "chrome://xmlrpctest/content/fact.xul" line: 31}]' when calling method: [nsIXmlRpcClientListener::onResult]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: file:///opt/mozilla/components/nsXmlRpcClient.js :: anonymous :: line 241" data: yes] The fix for these issues should be trivial, a patch is attached !! I'm open for comments :-) Reproducible: Always Steps to Reproduce: Actual Results: In case of authentification failure, nsIXmlRpcClientListener.onResult gets called, with null as status. Expected Results: In case of authentification failure, nsIXmlRpcClientListener.onError should be called. Because of this bug, javascript never gets notified when authentication has failed.
Assignee: core.xml → samuel
Attachment #167949 - Flags: review?(samuel)
is this affected, or blocked, by Bug 122495? (awaiting Samuel review)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #167949 - Flags: review?(samuel) → review+
Assignee: samuel → fabien
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: