From: Matthew Wire Date: Thu, 25 Aug 2022 14:18:03 +0000 (+0100) Subject: Force OAuth RedirectURL to always be backend URL. Otherwise it may get generated... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ffb2e2ea2801df6afe84c3a867e892d27c049b13;p=civicrm-core.git Force OAuth RedirectURL to always be backend URL. Otherwise it may get generated as frontend URL and fail to authenticate eg. when 'Inbound email' job run via CRON --- diff --git a/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php b/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php index e7a0f537fc..6590fe5bf4 100644 --- a/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php +++ b/ext/oauth-client/CRM/OAuth/BAO/OAuthClient.php @@ -67,7 +67,7 @@ class CRM_OAuth_BAO_OAuthClient extends CRM_OAuth_DAO_OAuthClient { */ public static function getRedirectUri() { return \Civi::settings()->get('oauthClientRedirectUrl') ?: - \CRM_Utils_System::url('civicrm/oauth-client/return', NULL, TRUE, NULL, FALSE); + \CRM_Utils_System::url('civicrm/oauth-client/return', NULL, TRUE, NULL, FALSE, FALSE, TRUE); } }