url-regex icon indicating copy to clipboard operation
url-regex copied to clipboard

Decode error

Open wadewegner opened this issue 8 years ago • 3 comments
trafficstars

The presence of ).{% trailing a valid URL (e.g. http://cnn.com/).{%) causes the error:

[PATH]/node_modules/normalize-url/index.js:82
		urlObj.pathname = decodeURI(urlObj.pathname);
		                  ^

URIError: URI malformed
    at decodeURI (native)
    at module.exports ([PATH]/node_modules/normalize-url/index.js:82:21)
    at [PATH]/node_modules/get-urls/index.js:14:10
    at Array.map (native)
    at module.exports ([PATH]/node_modules/get-urls/index.js:13:24)
    at [PATH]/index.js:17:16
    at Array.forEach (native)
    at [PATH]/index.js:15:9
    at [PATH]/node_modules/recursive-readdir/index.js:64:22
    at [PATH]/node_modules/recursive-readdir/index.js:64:22

wadewegner avatar Nov 22 '16 16:11 wadewegner

Note that @sindresorhus punted to you. https://github.com/sindresorhus/get-urls/issues/15#issuecomment-262281028

wadewegner avatar Nov 22 '16 16:11 wadewegner

@wadewegner is it still reproducible? I tried with the latest master and the problem is probably resolved.

KiranShakya avatar Nov 19 '19 13:11 KiranShakya

Please use https://github.com/niftylettuce/url-regex-safe as this package has a severe vulnerability (see #70).

niftylettuce avatar Aug 15 '20 08:08 niftylettuce