diff options
| author | Stormwind <stormwind@stormwinds-page.de> | 2012-12-22 19:08:02 +0100 | 
|---|---|---|
| committer | Stormwind <stormwind@stormwinds-page.de> | 2012-12-22 19:08:02 +0100 | 
| commit | 835234a52c487002a516792dbdea3a44d110ba3d (patch) | |
| tree | 6fce9eb0b4a96a22934dbe8c897dcf4859b542b5 /lib | |
| parent | 0e12faff226e73ea932150a912e89b3363fed76e (diff) | |
Improve query valid regex
Now a query string cannot look like 'foo=bar=foo' anymore.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/zero/patches/uri.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/lib/zero/patches/uri.rb b/lib/zero/patches/uri.rb index a761fbc..0b64abb 100644 --- a/lib/zero/patches/uri.rb +++ b/lib/zero/patches/uri.rb @@ -18,7 +18,6 @@ module URI        return self.decode_www_form_18 query      end -      # Own implementation of decode_www_form.      # Shall behave almost like the original method, but without any encoding      # stuff. @@ -28,7 +27,8 @@ module URI      #      def self.decode_www_form_18(query)        return [] if query.empty? -      unless query.match '=' + +      unless query.match /^[^#=;&]*=[^#=;&]*([;&][^#=;&]*=[^#=;&]*)*$/          raise ArgumentError,            "invalid data of application/x-www-form-urlencoded (#{query})"        end | 
