LP#1702978: memcache Remove method used in a variadic way
authorMike Rylander <mrylander@gmail.com>
Fri, 7 Jul 2017 19:34:57 +0000 (15:34 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 10 Aug 2018 12:10:35 +0000 (08:10 -0400)
Related to the OpenSRF branch on this same bug, the prevents Evergreen from
using a to-be-non-variadic memcache method in that way.  This prevents issues
for memcache keys that contain a %.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>

Open-ILS/src/c-apps/oils_auth.c

index b87d1ca..1836b02 100644 (file)
@@ -452,7 +452,9 @@ static int oilsAuthVerifyPassword( const osrfMethodContext* ctx, int user_id,
     int verified = 0;
 
     // We won't be needing the seed again, remove it
-    osrfCacheRemove("%s%s%s", OILS_AUTH_CACHE_PRFX, identifier, nonce);
+       char* key = va_list_to_string("%s%s%s", OILS_AUTH_CACHE_PRFX, identifier, nonce ); /**/
+    osrfCacheRemove(key);
+    free(key);
 
     // Ask the DB to verify the user's password.
     // Here, the password is md5(md5(password) + salt)