Merge pull request #14633 from bmillwood/fix-scope-check

Fix duplicate SCOPE_WRITE check
This commit is contained in:
Hypolite Petovan 2024-12-28 09:04:09 -05:00 committed by GitHub
commit f9f24b3881
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,7 +189,7 @@ class OAuth
'created_at' => DateTimeFormat::utcNow()
];
foreach ([BaseApi::SCOPE_READ, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_PUSH] as $scope) {
foreach ([BaseApi::SCOPE_READ, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_FOLLOW, BaseApi::SCOPE_PUSH] as $scope) {
if ($fields[$scope] && !$application[$scope]) {
Logger::warning('Requested token scope is not allowed for the application', ['token' => $fields, 'application' => $application]);
}