projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecd7fa0
)
6203: Use faster =~ instead of match.
author
Tom Clegg <tom@curoverse.com>
Mon, 8 Jun 2015 06:23:57 +0000
(
02:23
-0400)
committer
Tom Clegg <tom@curoverse.com>
Mon, 8 Jun 2015 06:23:57 +0000
(
02:23
-0400)
services/api/app/models/blob.rb
patch
|
blob
|
history
diff --git
a/services/api/app/models/blob.rb
b/services/api/app/models/blob.rb
index 56cdfb83a47d6487edd0494271b329075dbc0888..34600d7a25a8c716bd9d1fd6ec49cea052dc0c58 100644
(file)
--- a/
services/api/app/models/blob.rb
+++ b/
services/api/app/models/blob.rb
@@
-90,7
+90,7
@@
class Blob
if !timestamp
raise Blob::InvalidSignatureError.new 'No signature provided.'
end
-
if !timestamp.match
/^[\da-f]+$/
+
unless timestamp =~
/^[\da-f]+$/
raise Blob::InvalidSignatureError.new 'Timestamp is not a base16 number.'
end
if timestamp.to_i(16) < (opts[:now] or db_current_time.to_i)