summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-16 18:28:52 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-16 18:28:52 +0200
commit79eaaa68dd5380d3572ed48e32e556531bfd49eb (patch)
tree580817522c32e9a1fa059dc993c80189315e19db
parent454ad6b5726d425737864c3885e9daf161525dfd (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