Merge branch '6087-collection-timing' (early part) refs #6087 refs #6092
[arvados.git] / services / api / app / models / blob.rb
index 799279d0400f31c2cf54feb503a1f48401e96321..7ae13ef2d0126d0b41b28a344e391ad55a7e6a41 100644 (file)
@@ -91,7 +91,7 @@ class Blob
     if !timestamp.match /^[\da-f]+$/
       raise Blob::InvalidSignatureError.new 'Timestamp is not a base16 number.'
     end
-    if timestamp.to_i(16) < db_current_time.to_i
+    if timestamp.to_i(16) < (opts[:now] or db_current_time.to_i)
       raise Blob::InvalidSignatureError.new 'Signature expiry time has passed.'
     end