Skip to content

Commit 9eada52

Browse files
committed
Land rapid7#3097, Rex::Text.uri_encode RFC 3986 fix
2 parents 267c415 + 8543da0 commit 9eada52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/rex/text.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,8 @@ def self.uri_encode(str, mode = 'hex-normal')
732732
return str if mode == 'none' # fast track no encoding
733733

734734
all = /[^\/\\]+/
735-
normal = /[^a-zA-Z0-9\/\\\.\-]+/
736-
normal_na = /[a-zA-Z0-9\/\\\.\-]/
735+
# http://tools.ietf.org/html/rfc3986#section-2.3
736+
normal = /[^a-zA-Z0-9\/\\\.\-_~]+/
737737

738738
case mode
739739
when 'hex-normal'

0 commit comments

Comments
 (0)