Issues (22)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  Header Injection
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Security/TokenAuthenticator.php (6 issues)

1
<?php
2
3
/*
4
 * This file is part of the TheAlternativeZurich/events project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Security;
13
14
use Symfony\Component\HttpFoundation\RedirectResponse;
15
use Symfony\Component\HttpFoundation\Request;
16
use Symfony\Component\HttpFoundation\Response;
17
use Symfony\Component\Intl\Exception\MethodNotImplementedException;
18
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
19
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
20
use Symfony\Component\Security\Core\Exception\AuthenticationException;
21
use Symfony\Component\Security\Core\User\UserInterface;
22
use Symfony\Component\Security\Core\User\UserProviderInterface;
23
use Symfony\Component\Security\Guard\AbstractGuardAuthenticator;
24
25
class TokenAuthenticator extends AbstractGuardAuthenticator
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Securi...tractGuardAuthenticator has been deprecated: since Symfony 5.3, use the new authenticator system instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

25
class TokenAuthenticator extends /** @scrutinizer ignore-deprecated */ AbstractGuardAuthenticator
Loading history...
26
{
27
    /**
28
     * @var UrlGeneratorInterface
29
     */
30
    private $generator;
31
32
    /**
33
     * TokenAuthenticator constructor.
34
     */
35
    public function __construct(UrlGeneratorInterface $generator)
36
    {
37
        $this->generator = $generator;
38
    }
39
40
    public function supports(Request $request): ?bool
41
    {
42
        return false;
43
    }
44
45
    public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
46
    {
47
        throw new MethodNotImplementedException(__FUNCTION__);
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Intl\E...NotImplementedException has been deprecated: since Symfony 5.3, use symfony/polyfill-intl-icu ^1.21 instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

47
        throw /** @scrutinizer ignore-deprecated */ new MethodNotImplementedException(__FUNCTION__);
Loading history...
48
    }
49
50
    public function onAuthenticationFailure(Request $request, AuthenticationException $exception): ?Response
51
    {
52
        throw new MethodNotImplementedException(__FUNCTION__);
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Intl\E...NotImplementedException has been deprecated: since Symfony 5.3, use symfony/polyfill-intl-icu ^1.21 instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

52
        throw /** @scrutinizer ignore-deprecated */ new MethodNotImplementedException(__FUNCTION__);
Loading history...
53
    }
54
55
    public function start(Request $request, AuthenticationException $authException = null)
56
    {
57
        return new RedirectResponse($this->generator->generate('authenticate'));
58
    }
59
60
    public function getCredentials(Request $request)
61
    {
62
        throw new MethodNotImplementedException(__FUNCTION__);
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Intl\E...NotImplementedException has been deprecated: since Symfony 5.3, use symfony/polyfill-intl-icu ^1.21 instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

62
        throw /** @scrutinizer ignore-deprecated */ new MethodNotImplementedException(__FUNCTION__);
Loading history...
63
    }
64
65
    public function getUser($credentials, UserProviderInterface $userProvider)
66
    {
67
        throw new MethodNotImplementedException(__FUNCTION__);
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Intl\E...NotImplementedException has been deprecated: since Symfony 5.3, use symfony/polyfill-intl-icu ^1.21 instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

67
        throw /** @scrutinizer ignore-deprecated */ new MethodNotImplementedException(__FUNCTION__);
Loading history...
68
    }
69
70
    public function checkCredentials($credentials, UserInterface $user)
71
    {
72
        throw new MethodNotImplementedException(__FUNCTION__);
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\Intl\E...NotImplementedException has been deprecated: since Symfony 5.3, use symfony/polyfill-intl-icu ^1.21 instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

72
        throw /** @scrutinizer ignore-deprecated */ new MethodNotImplementedException(__FUNCTION__);
Loading history...
73
    }
74
75
    public function supportsRememberMe()
76
    {
77
        return true;
78
    }
79
}
80