Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #18 from eonu/master
Browse files Browse the repository at this point in the history
 Change SecureRandom.random_bytes to Secure_random.hex to fix URLs
  • Loading branch information
eonu authored Jan 1, 2019
2 parents 8c5a44e + b0c5107 commit a382772
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.5.3

#### Major changes

- (**`core/helpers/maintenance.rb`**): Change dummy route to use `SecureRandom.hex` instead of `SecureRandon.random_bytes`, which used to generate invalid URLs.

# 0.5.2

#### Major changes
Expand Down
4 changes: 2 additions & 2 deletions lib/eucalypt/core/helpers/maintenance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class ApplicationController < Sinatra::Base
unlink '*', &block
end
else
define_singleton_method(:maintenance) {|&block| get "/#{SecureRandom.random_bytes 16}", &block}
define_singleton_method(:maintenance) {|&block| get 3.times.map{"/#{SecureRandom.hex 8}"}.join(), &block}
end
else
define_singleton_method(:maintenance) {|&block| get "/#{SecureRandom.random_bytes 16}", &block}
define_singleton_method(:maintenance) {|&block| get 3.times.map{"/#{SecureRandom.hex 8}"}.join(), &block}
end
end
2 changes: 1 addition & 1 deletion lib/eucalypt/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Eucalypt
VERSION = '0.5.2'
VERSION = '0.5.3'
end

0 comments on commit a382772

Please sign in to comment.