Skip to main content

Bug Tracker

Side navigation

#6873 closed bug (duplicate)

Opened August 04, 2010 09:58PM UTC

Closed October 27, 2010 12:27AM UTC

Last modified March 13, 2012 10:06PM UTC

Incorrect cross-site XHR detecting

Reported by: oryol Owned by:
Priority: undecided Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
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.

Attachments (0)
Change History (2)

Changed October 27, 2010 12:27AM UTC by snover comment:1

priority: → undecided
resolution: → duplicate
status: newclosed

Changed October 27, 2010 12:27AM UTC by snover comment:2

Duplicate of #6908.