]> git.mxchange.org Git - friendica.git/commitdiff
Fix duplicate SCOPE_WRITE check
authorBen Millwood <thebenmachine+git@gmail.com>
Sat, 28 Dec 2024 02:40:56 +0000 (02:40 +0000)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 28 Dec 2024 14:03:09 +0000 (09:03 -0500)
It's pretty clear from context this is intended to be SCOPE_FOLLOW. It's
been like this ever since it was introduced in revision 49207a8

src/Security/OAuth.php

index 9a50a438d7c479925658e231da7dd23f8195c7eb..d169cb7eab8964a8e6e8425c0879da61b1b3f58c 100644 (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]);
                        }