summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-16 18:28:52 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-17 18:12:25 +0200
commit219626d04cbfd977db087284f6d231cf5d359bf7 (patch)
tree57abf910259e00e5edfad24e3c351c8fc11849c9
parentcfb2c810e6f6754ceaf3be6cc0a472ec228935a7 (diff)
Use SecureRandom instead of the hand rolled implementation
-rw-r--r--lib/authentication.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/authentication.rb b/lib/authentication.rb
index a936589..4a3ad46 100644
--- a/lib/authentication.rb
+++ b/lib/authentication.rb
@@ -31,7 +31,7 @@ module Authentication
31 end 31 end
32 32
33 def make_token 33 def make_token
34 secure_digest(Time.now, (1..10).map{ rand.to_s }) 34 SecureRandom.hex(20)
35 end 35 end
36 end # class methods 36 end # class methods
37 37
@@ -100,4 +100,4 @@ module Authentication
100 end 100 end
101 end # instance methods 101 end # instance methods
102 end 102 end
103end \ No newline at end of file 103end