Skip to content

Commit

Permalink
Escape hyphen in encoding regex
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck authored May 2, 2024
1 parent 60bea93 commit 26f9aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vault/encode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module EncodePath
#
# @return [String]
def encode_path(path)
path.b.gsub(%r!([^a-zA-Z0-9_.-/]+)!) { |m|
path.b.gsub(%r!([^a-zA-Z0-9_.\-/]+)!) { |m|
'%' + m.unpack('H2' * m.bytesize).join('%').upcase
}
end
Expand Down

0 comments on commit 26f9aaa

Please sign in to comment.