Ticket #5089 (closed bug: invalid)
Basic authentication fails with "@" in password (Safari)
| Reported by: | mahemoff | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | ajax | Version: | 1.3.2 |
| Keywords: | authentication | Cc: | |
| Blocking: | Blocked by: |
Description
My script posts status messages to Twitter, using $.ajax() username and password parameters for HTTP basic auth. I found it worked on Firefox (3.5), but failed on Safari (3.2.3). This is probably because the call is being converted to http://username@password:http://twitter.com/etc, and the presence of an "@" becomes ambiguous.
xhr = $.ajax({
type: "POST", url: " http://twitter.com/statuses/update.json", data: "status="+$("#status").val(), success: function(tweetJSON) {
...
}, error: function(xhr, errorStatus) {
...
}, username: $("#username"+accountIndex).val(), password: $("#password"+accountIndex).val()
});
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

jQuery just passes the username and password to the xhr object; if there is a problem beyond that it would be in Safari. Could you reopen the ticket with some more information about what is passed to the site when the problem occurs?