aboutsummaryrefslogtreecommitdiff
path: root/src/guff.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff.cr')
-rw-r--r--src/guff.cr5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/guff.cr b/src/guff.cr
index d641032..783c98a 100644
--- a/src/guff.cr
+++ b/src/guff.cr
@@ -254,7 +254,6 @@ module Guff
def create_token
remove_expired_tokens
- p @cache
# generate and cache new token
r = SecureRandom.hex(16)
@@ -280,6 +279,9 @@ module Guff
private def remove_expired_tokens
now = Time.now.epoch
+ # FIXME: limit the size of the cache
+ # to prevent insane memory use
+
# remove expired entries
@cache.delete_if do |key, val|
val < now
@@ -566,7 +568,6 @@ module Guff
end
end
- # TODO: check referrer, add x-frame-options
class AdminPageHandler < AuthenticatedHandler
def initialize(context : Context)
super(context, %w{admin editor})