Skip to content

Commit 119e6ab

Browse files
committed
Merge branch 'master' into gh-pages
2 parents d5268b5 + 926b2aa commit 119e6ab

File tree

12 files changed

+116
-14
lines changed

12 files changed

+116
-14
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
The release notes tracked in this document are also made available on the [releases page](https://github.com/medialize/URI.js/releases)
44

5+
### 1.19.10 (March 5th 2022) ###
6+
7+
* **SECURITY** fixing [`URI.parse()`](http://medialize.github.io/URI.js/docs.html#static-parse) handle excessive colons in protocol delimiter - disclosed by [huydoppa](https://github.com/huydoppa) via https://huntr.dev/
8+
59
### 1.19.9 (March 3rd 2022) ###
610

711
* **SECURITY** fixing [`URI.parse()`](http://medialize.github.io/URI.js/docs.html#static-parse) handle leading whitespace - disclosed by [p0cas](https://github.com/p0cas) via https://huntr.dev/

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "urijs",
3-
"version": "1.19.9",
3+
"version": "1.19.10",
44
"main": "src/URI.js",
55
"ignore": [
66
".*",

build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function build(files) {
2929
output_format: "text",
3030
output_info: "compiled_code"
3131
}, function(data) {
32-
var code = "/*! URI.js v1.19.9 http://medialize.github.io/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
32+
var code = "/*! URI.js v1.19.10 http://medialize.github.io/URI.js/ */\n/* build contains: " + files.join(', ') + " */\n" + data;
3333
$progress.hide();
3434
$out.val(code).parent().show();
3535
$out.prev().find('a').remove();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "urijs",
3-
"version": "1.19.9",
3+
"version": "1.19.10",
44
"title": "URI.js - Mutating URLs",
55
"author": {
66
"name": "Rodney Rehm",

src/IPv6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* IPv6 Support
44
*
5-
* Version: 1.19.9
5+
* Version: 1.19.10
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.io/URI.js/

src/SecondLevelDomains.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* Second Level Domain (SLD) Support
44
*
5-
* Version: 1.19.9
5+
* Version: 1.19.10
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.io/URI.js/

src/URI.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* URI.js - Mutating URLs
33
*
4-
* Version: 1.19.9
4+
* Version: 1.19.10
55
*
66
* Author: Rodney Rehm
77
* Web: http://medialize.github.io/URI.js/
@@ -81,7 +81,7 @@
8181
return /^[0-9]+$/.test(value);
8282
}
8383

84-
URI.version = '1.19.9';
84+
URI.version = '1.19.10';
8585

8686
var p = URI.prototype;
8787
var hasOwn = Object.prototype.hasOwnProperty;
@@ -517,7 +517,7 @@
517517
}
518518

519519
// slashes and backslashes have lost all meaning for the web protocols (https, http, wss, ws)
520-
string = string.replace(/^(https?|ftp|wss?)?:[/\\]*/i, '$1://');
520+
string = string.replace(/^(https?|ftp|wss?)?:+[/\\]*/i, '$1://');
521521

522522
// extract protocol
523523
if (string.substring(0, 2) === '//') {

src/URI.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/URITemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* URI Template Support - http://tools.ietf.org/html/rfc6570
44
*
5-
* Version: 1.19.9
5+
* Version: 1.19.10
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.io/URI.js/

src/jquery.URI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* URI.js - Mutating URLs
33
* jQuery Plugin
44
*
5-
* Version: 1.19.9
5+
* Version: 1.19.10
66
*
77
* Author: Rodney Rehm
88
* Web: http://medialize.github.io/URI.js/jquery-uri-plugin.html

src/jquery.URI.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/urls.js

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,6 +2620,104 @@ var urls = [{
26202620
idn: false,
26212621
punycode: false
26222622
}
2623+
}, {
2624+
name: 'excessive colon in protocol delimiter',
2625+
url: 'http:://www.example.org:8080/hello:world',
2626+
_url: 'http://www.example.org:8080/hello:world',
2627+
parts: {
2628+
protocol: 'http',
2629+
username: null,
2630+
password: null,
2631+
hostname: 'www.example.org',
2632+
port: '8080',
2633+
path: '/hello:world',
2634+
query: null,
2635+
fragment: null
2636+
},
2637+
accessors: {
2638+
protocol: 'http',
2639+
username: '',
2640+
password: '',
2641+
port: '8080',
2642+
path: '/hello:world',
2643+
query: '',
2644+
fragment: '',
2645+
resource: '/hello:world',
2646+
authority: 'www.example.org:8080',
2647+
origin: 'http://www.example.org:8080',
2648+
userinfo: '',
2649+
subdomain: 'www',
2650+
domain: 'example.org',
2651+
tld: 'org',
2652+
directory: '/',
2653+
filename: 'hello:world',
2654+
suffix: '',
2655+
hash: '', // location.hash style
2656+
search: '', // location.search style
2657+
host: 'www.example.org:8080',
2658+
hostname: 'www.example.org'
2659+
},
2660+
is: {
2661+
urn: false,
2662+
url: true,
2663+
relative: false,
2664+
name: true,
2665+
sld: false,
2666+
ip: false,
2667+
ip4: false,
2668+
ip6: false,
2669+
idn: false,
2670+
punycode: false
2671+
}
2672+
}, {
2673+
name: 'excessive colon in protocol delimiter backslashes',
2674+
url: 'http::\\\\www.example.org:8080/hello:world',
2675+
_url: 'http://www.example.org:8080/hello:world',
2676+
parts: {
2677+
protocol: 'http',
2678+
username: null,
2679+
password: null,
2680+
hostname: 'www.example.org',
2681+
port: '8080',
2682+
path: '/hello:world',
2683+
query: null,
2684+
fragment: null
2685+
},
2686+
accessors: {
2687+
protocol: 'http',
2688+
username: '',
2689+
password: '',
2690+
port: '8080',
2691+
path: '/hello:world',
2692+
query: '',
2693+
fragment: '',
2694+
resource: '/hello:world',
2695+
authority: 'www.example.org:8080',
2696+
origin: 'http://www.example.org:8080',
2697+
userinfo: '',
2698+
subdomain: 'www',
2699+
domain: 'example.org',
2700+
tld: 'org',
2701+
directory: '/',
2702+
filename: 'hello:world',
2703+
suffix: '',
2704+
hash: '', // location.hash style
2705+
search: '', // location.search style
2706+
host: 'www.example.org:8080',
2707+
hostname: 'www.example.org'
2708+
},
2709+
is: {
2710+
urn: false,
2711+
url: true,
2712+
relative: false,
2713+
name: true,
2714+
sld: false,
2715+
ip: false,
2716+
ip4: false,
2717+
ip6: false,
2718+
idn: false,
2719+
punycode: false
2720+
}
26232721
}
26242722
];
26252723

0 commit comments

Comments
 (0)