From fa40b70a69e1802e92ff2533cb668d8cac4a5f4f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 25 Oct 2021 20:27:23 +0100 Subject: [PATCH] Reduce TOTP lookbehind --- cookbooks/overpass/templates/default/totp-filter.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/overpass/templates/default/totp-filter.erb b/cookbooks/overpass/templates/default/totp-filter.erb index 9fbe790a1..75145c632 100644 --- a/cookbooks/overpass/templates/default/totp-filter.erb +++ b/cookbooks/overpass/templates/default/totp-filter.erb @@ -8,7 +8,7 @@ totp = ROTP::TOTP.new("<%= @totp_key %>", :interval => 3600) STDIN.each_line do |header| cookies = CGI::Cookie.parse(header) - if totp.verify(cookies["_osm_totp_token"], :drift_behind => 43200, :drift_ahead => 3600) + if totp.verify(cookies["_osm_totp_token"], :drift_behind => 3600, :drift_ahead => 3600) puts "1" else puts "0" -- 2.39.5