From: Chip Black Date: Fri, 25 Jul 2014 23:17:04 +0000 (-0500) Subject: Update token timestamp on auth verification X-Git-Tag: v1.10~8 X-Git-Url: http://git.bytex64.net/?a=commitdiff_plain;h=859f2b6bd8846ff685a61eec72e96753a8c956f5;hp=22ea1c1c4327635ca2ac9a7e2b7b074bd03201ba;p=blerg.git Update token timestamp on auth verification --- diff --git a/common/auth.c b/common/auth.c index d460b41..240ac47 100644 --- a/common/auth.c +++ b/common/auth.c @@ -380,6 +380,10 @@ int auth_check_token(const char *username, const char *given_token) { return 0; } ret = (stringring_find(sr, given_token, AUTHENTICATION_TIMEOUT) != -1); + if (ret == 1) { + /* Update token timestamp */ + stringring_touch(sr, given_token); + } stringring_close(sr); return ret;