]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/overpass/templates/default/totp-filter.erb
Reduce TOTP lookbehind
[chef.git] / 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"