From 8dccb66decf9d9c7d8a9004c880fe20f6b6441c6 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 12 May 2021 12:19:15 +0000 Subject: [PATCH] Display the application name --- src/Module/OAuth/Authorize.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Module/OAuth/Authorize.php b/src/Module/OAuth/Authorize.php index 203ed7474..a93fc0038 100644 --- a/src/Module/OAuth/Authorize.php +++ b/src/Module/OAuth/Authorize.php @@ -49,19 +49,19 @@ class Authorize extends BaseApi $request = $_REQUEST; unset($request['pagename']); - $redirect = urlencode('oauth/authorize?' . http_build_query($request)); + $redirect = 'oauth/authorize?' . http_build_query($request); $uid = local_user(); if (empty($uid)) { Logger::info('Redirect to login'); - DI::app()->redirect('login?return_path=' . $redirect); + DI::app()->redirect('login?return_path=' . urlencode($redirect)); } else { Logger::info('Already logged in user', ['uid' => $uid]); } if (!self::existsTokenForUser($application, $uid) && !DI::session()->get('oauth_acknowledge')) { Logger::info('Redirect to acknowledge'); - DI::app()->redirect('oauth/acknowledge?return_path=' . $redirect); + DI::app()->redirect('oauth/acknowledge?' . http_build_query(['return_path' => $redirect, 'application' => $application['name']])); } DI::session()->remove('oauth_acknowledge');