mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge pull request #10150 from appwrite/fix-apple-oauth
fix: prevent injected $user from being shadowed
This commit is contained in:
commit
00889426de
1 changed files with 3 additions and 3 deletions
|
|
@ -1461,9 +1461,9 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
|
|||
if (!empty($nameOAuth)) {
|
||||
$name = $nameOAuth;
|
||||
} elseif ($userParam !== null) {
|
||||
$user = \json_decode($userParam, true);
|
||||
if (isset($user['name']['firstName']) && isset($user['name']['lastName'])) {
|
||||
$name = $user['name']['firstName'] . ' ' . $user['name']['lastName'];
|
||||
$userDecoded = \json_decode($userParam, true);
|
||||
if (isset($userDecoded['name']['firstName']) && isset($userDecoded['name']['lastName'])) {
|
||||
$name = $userDecoded['name']['firstName'] . ' ' . $userDecoded['name']['lastName'];
|
||||
}
|
||||
}
|
||||
$email = $oauth2->getUserEmail($accessToken);
|
||||
|
|
|
|||
Loading…
Reference in a new issue