mirror of
				https://github.com/elyby/oauth2-server.git
				synced 2025-05-31 14:12:07 +05:30 
			
		
		
		
	Escape scope parameter to reduce pontential XSS vector
This commit is contained in:
		@@ -105,7 +105,10 @@ class OAuthServerException extends \Exception
 | 
			
		||||
    public static function invalidScope($scope, $redirectUri = null)
 | 
			
		||||
    {
 | 
			
		||||
        $errorMessage = 'The requested scope is invalid, unknown, or malformed';
 | 
			
		||||
        $hint = sprintf('Check the `%s` scope', $scope);
 | 
			
		||||
        $hint = sprintf(
 | 
			
		||||
            'Check the `%s` scope',
 | 
			
		||||
            htmlspecialchars($scope, ENT_QUOTES, 'UTF-8', false)
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
        return new static($errorMessage, 5, 'invalid_scope', 400, $hint, $redirectUri);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user