Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'balexand-master'

  • Loading branch information...
commit 2503ef89e50c88bbe44ca2b7d98617a023b8977e 2 parents 4e3f81b + 884881a
C o u r t e n a y courtenay authored

Showing 1 changed file with 10 additions and 2 deletions. Show diff stats Hide diff stats

  1. +10 2 lib/openid/store/memcache.rb
12 lib/openid/store/memcache.rb
@@ -63,7 +63,11 @@ def use_nonce(server_url, timestamp, salt)
63 63 ts = timestamp.to_s # base 10 seconds since epoch
64 64 nonce_key = key_prefix + 'N' + server_url + '|' + ts + '|' + salt
65 65 result = @cache_client.add(nonce_key, '', expiry(Nonce.skew + 5))
66   - return !!(result =~ /^STORED/)
  66 + if result.is_a? String
  67 + return !!(result =~ /^STORED/)
  68 + else
  69 + return result == true
  70 + end
67 71 end
68 72
69 73 def assoc_key(server_url, assoc_handle=nil)
@@ -87,7 +91,11 @@ def cleanup_associations
87 91
88 92 def delete(key)
89 93 result = @cache_client.delete(key)
90   - return !!(result =~ /^DELETED/)
  94 + if result.is_a? String
  95 + return !!(result =~ /^DELETED/)
  96 + else
  97 + return result == true
  98 + end
91 99 end
92 100
93 101 def serialize(assoc)

0 comments on commit 2503ef8

Please sign in to comment.
Something went wrong with that request. Please try again.