diff --git a/apps/oauth2/lib/Controller/OauthApiController.php b/apps/oauth2/lib/Controller/OauthApiController.php
index c085c790e22..9f089ce2d42 100644
--- a/apps/oauth2/lib/Controller/OauthApiController.php
+++ b/apps/oauth2/lib/Controller/OauthApiController.php
@@ -70,7 +70,6 @@ final class OauthApiController extends Controller {
* Get a token
*
* @param 'authorization_code'|'refresh_token' $grant_type Token type that should be granted
- * @psalm-param string $grant_type
* @param ?string $code Code of the flow
* @param ?string $refresh_token Refresh token
* @param ?string $client_id Client ID
@@ -90,6 +89,7 @@ final class OauthApiController extends Controller {
): JSONResponse {
// We only handle two types
+ /** @psalm-suppress DocblockTypeContradiction We don't trust user input */
if ($grant_type !== 'authorization_code' && $grant_type !== 'refresh_token') {
$response = new JSONResponse([
'error' => 'invalid_grant',
diff --git a/apps/oauth2/tests/Controller/OauthApiControllerTest.php b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
index 82c2c57ab44..6efa02fe62b 100644
--- a/apps/oauth2/tests/Controller/OauthApiControllerTest.php
+++ b/apps/oauth2/tests/Controller/OauthApiControllerTest.php
@@ -124,6 +124,7 @@ final class OauthApiControllerTest extends TestCase {
], Http::STATUS_BAD_REQUEST);
$expected->throttle(['invalid_grant' => 'foo']);
+ /** @psalm-suppress InvalidArgument Test that we don't trust user input */
$this->assertEquals($expected, $this->oauthApiController->getToken('foo', null, null, null, null));
}
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index 035c0bf223d..ea48a97dcc6 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -2226,26 +2226,6 @@
-
-
-
-
-
-
-
-
-
-
-
- request->server]]>
-
-
-
-
-
-
-
-
getUID())]]>