Project

General

Profile

Actions

Bug #6520

closed

Invalid url is identified as valid

Added by zheka (Eugene Mirkin) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
1.9.3p125
Backport:
[ruby-core:45344]

Description

(({
1.9.3p125 :006 > require 'uri'
=> true
1.9.3p125 :007 > URI.parse invalid_url
URI::InvalidURIError: bad URI(is not URI?): http://abc</option%3E
1.9.3p125 :009 > invalid_url =~ URI::regexp
=> 0
}))

As you can see, 'parse' behaves correctly (ie raises an exception), while the 'regexp' does not catch the error

Actions

Also available in: Atom PDF

Like0
Like0