Bug Tracker

Modify

Ticket #6873 (closed bug: duplicate)

Opened 3 years ago

Last modified 15 months ago

Incorrect cross-site XHR detecting

Reported by: oryol Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocking: Blocked by:

Description

Following code may work incorrect for default (80) http port: var parts = rurl.exec( s.url ),

remote = parts && (parts[1] && parts[1] !== location.protocol
parts[2] !== location.host);

For example IE9 (Preview 4) returns default port in window.location.host (for example - 'localhost:80'). Even more - if we send XHR to ' http://some-host:80/some-path', then jQuery will detect it as remote query (which is wrong).

We need to check for both hosts (parts[2] and location.host) that them contains (or not) port. If not - add default 80.

Change History

comment:1 Changed 3 years ago by snover

  • Priority set to undecided
  • Status changed from new to closed
  • Resolution set to duplicate

comment:2 Changed 3 years ago by snover

Duplicate of #6908.

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.