]> git.openstreetmap.org Git - chef.git/commitdiff
Reduce TOTP lookbehind
authorTom Hughes <tom@compton.nu>
Mon, 25 Oct 2021 19:27:23 +0000 (20:27 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 25 Oct 2021 19:27:39 +0000 (20:27 +0100)
cookbooks/overpass/templates/default/totp-filter.erb

index 9fbe790a1f1c736cff24869d12d3950eb3d88d16..75145c63213d0121a3f2b96f103801a3c5f4449a 100644 (file)
@@ -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"