aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-07-02 15:21:09 +0100
committerRobin Houston <robin.houston@gmail.com>2012-07-02 15:21:53 +0100
commit5c2eb90495ff5ccd38ac1a0cddc3c2408c69bcf9 (patch)
tree953ddd6630529a1610403f6cf02767c3410ed8d1
parent229b21bdf661fd5590c9b0b6bf4b2c9913f12935 (diff)
Use 33 bytes consistently
Let’s use 33 bytes consistently for the API key, to avoid an = pad at the end when it’s base64-encoded.
-rw-r--r--app/models/public_body.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index a372de435..bc8f084bb 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -95,7 +95,7 @@ class PublicBody < ActiveRecord::Base
self.publication_scheme = "" if self.publication_scheme.nil?
# Set an API key if there isn’t one
- self.api_key = SecureRandom.base64(32) if self.api_key.nil?
+ self.api_key = SecureRandom.base64(33) if self.api_key.nil?
end
# like find_by_url_name but also search historic url_name if none found