Bug Tracker

Modify

Ticket #5089 (closed bug: invalid)

Opened 4 years ago

Last modified 3 years ago

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

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

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?

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.