From f0a9cbfb9d7f9511ebafc5532ba3a3fd1d4bf911 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martti=20Rannanj=C3=A4rvi?= Date: Tue, 7 Jun 2022 09:40:10 +0300 Subject: [PATCH] auth: db_oauth2_have_all_fields() - Fix auth field existence check The correct pointer to pass on there is field, since ptr is the original which still includes the ending }. Broken in 9b670175445a75987a713ff899d1a945255b0b5b and incorrectly fixed in 5c2f3d0b85830d18dbb8b45b348da091e24d1b3b. --- src/auth/db-oauth2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/db-oauth2.c b/src/auth/db-oauth2.c index 3c6ef3acb9..4ea699b62b 100644 --- a/src/auth/db-oauth2.c +++ b/src/auth/db-oauth2.c @@ -395,7 +395,7 @@ db_oauth2_have_all_fields(struct db_oauth2_request *req) ptr = ptr+idx; field = t_strndup(ptr,size); if (str_begins(field, "oauth2:") && - !auth_fields_exists(req->fields, ptr+7)) + !auth_fields_exists(req->fields, field+7)) return FALSE; ptr = ptr+size; } -- 2.47.3