From: njhamann Date: Sat, 24 Aug 2013 17:02:17 +0000 (-0400) Subject: Fix #14036. Remove user/pass from ajaxLocation. Close gh-1340. X-Git-Tag: 2.1.0-beta2~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0d68b7877f761264bfe4950e4df156b854925a6b;p=jquery.git Fix #14036. Remove user/pass from ajaxLocation. Close gh-1340. --- diff --git a/AUTHORS.txt b/AUTHORS.txt index 01bb1f804..04e0542dd 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -176,3 +176,5 @@ Jeremy Dunck Chris Price Guy Bedford Amey Sakhadeo +Noah Hamann + diff --git a/src/ajax.js b/src/ajax.js index 15a5e9d3b..d39de2a9b 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -21,7 +21,7 @@ var rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, - rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)