diff options
author | Matthew Draper <matthew@trebex.net> | 2017-07-09 07:59:44 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-09 07:59:44 +0930 |
commit | 650ea5e5cf50d8a7242499463cf1762922d330a8 (patch) | |
tree | 747a5a94bf3f1f98d6debf954ca0d06b6faf9c27 /activerecord/lib | |
parent | 72e1c4229ab0af6a76c1635adff76fc02fa7fe71 (diff) | |
parent | 38b041713b609d8fcd2c458804cdef8a81e567a7 (diff) | |
download | rails-650ea5e5cf50d8a7242499463cf1762922d330a8.tar.gz rails-650ea5e5cf50d8a7242499463cf1762922d330a8.tar.bz2 rails-650ea5e5cf50d8a7242499463cf1762922d330a8.zip |
Merge pull request #29715 from reverbdotcom/ptd/fix-invalid-uuids
Don't allow uuids with orphan curly braces
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb index 5e839228e9..db92333ef7 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/uuid.rb @@ -3,7 +3,7 @@ module ActiveRecord module PostgreSQL module OID # :nodoc: class Uuid < Type::Value # :nodoc: - ACCEPTABLE_UUID = %r{\A\{?([a-fA-F0-9]{4}-?){8}\}?\z}x + ACCEPTABLE_UUID = %r{\A(\{)?([a-fA-F0-9]{4}-?){8}(?(1)\}|)\z} alias_method :serialize, :deserialize |