From: Tom Hughes Date: Mon, 7 Nov 2016 11:31:58 +0000 (+0000) Subject: Expire old oauth nonces X-Git-Tag: live~3687 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a5a4ab8bcc8d605af919069f4e71bd0acb9a82cf Expire old oauth nonces --- diff --git a/script/cleanup b/script/cleanup index d7f29239c..3eaeef7c6 100755 --- a/script/cleanup +++ b/script/cleanup @@ -3,5 +3,6 @@ require File.dirname(__FILE__) + "/../config/environment" UserToken.delete_all("expiry < NOW()") +OauthNonce.delete_all("timestamp < EXTRACT(EPOCH FROM NOW() - INTERVAL '1 day')") exit 0