Skip to content

Commit

Permalink
Strict regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jan 31, 2013
1 parent 2b60a6b commit 9442c3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def resolve_hash_connection(spec) # :nodoc:
end

# For DATABASE_URL, accept a limited concept of ints and floats
SIMPLE_INT = /^\d+$/
SIMPLE_FLOAT = /^\d+\.\d+$/
SIMPLE_INT = /\A\d+$\z/
SIMPLE_FLOAT = /\A\d+\.\d+\z/

def connection_url_to_hash(url) # :nodoc:
config = URI.parse url
Expand Down

0 comments on commit 9442c3e

Please sign in to comment.