Skip to content

Commit

Permalink
Ensure URL_REGEX matches the *whole* string.
Browse files Browse the repository at this point in the history
* `URI::DEFAULT_PARSER#make_regexp` does not output a `\A...\z`
  bounded Regexp.
  • Loading branch information
postmodern committed Apr 8, 2024
1 parent b66c2ca commit 809e7ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ronin/cli/commands/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Http < ValueProcessorCommand
include Printing::HTTP

# `http://` and `https://` URL validation regex.
URL_REGEX = URI::DEFAULT_PARSER.make_regexp(%w[http https])
URL_REGEX = /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/

usage '[options] {URL [...] | --shell URL}'

Expand Down

0 comments on commit 809e7ef

Please sign in to comment.