Issues (63)

Security Analysis    not enabled

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

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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.

Event/AuthenticationHandlerEvent.php (1 issue)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * This file is part of the LdapToolsBundle package.
4
 *
5
 * (c) Chad Sikorra <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace LdapTools\Bundle\LdapToolsBundle\Event;
12
13
use Symfony\Component\EventDispatcher\Event;
14
use Symfony\Component\HttpFoundation\Request;
15
use Symfony\Component\HttpFoundation\Response;
16
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
17
use Symfony\Component\Security\Core\Exception\AuthenticationException;
18
19
/**
20
 * Represents an authentication handler event, such as success or failure, where the response can be set.
21
 *
22
 * @author Chad Sikorra <[email protected]>
23
 */
24
class AuthenticationHandlerEvent extends Event
25
{
26
    /**
27
     * The event name that happens after the default authentication success handler is called.
28
     */
29
    const SUCCESS = 'ldap_tools_bundle.guard.login.success';
30
31
    /**
32
     * The event name that happens after the default authentication failure handler is called.
33
     */
34
    const FAILURE = 'ldap_tools_bundle.guard.login.failure';
35
36
    /**
37
     * The event name that happens when the entry point is called for the guard and returns a redirect/response.
38
     */
39
    const START = 'ldap_tools_bundle.guard.login.start';
40
41
    /**
42
     * @var Response
43
     */
44
    protected $response;
45
46
    /**
47
     * @var AuthenticationException|null
48
     */
49
    protected $exception;
50
51
    /**
52
     * @var Request
53
     */
54
    protected $request;
55
56
    /**
57
     * @var TokenInterface|null
58
     */
59
    protected $token;
60
61
    /**
62
     * @var string|null
63
     */
64
    protected $providerKey;
65
66
    /**
67
     * @param Response $response
68
     * @param Request $request
69
     * @param null|AuthenticationException $exception
70
     * @param TokenInterface|null $token
71
     * @param string|null $providerKey
72
     */
73
    public function __construct(Response $response, Request $request, AuthenticationException $exception = null, TokenInterface $token = null, $providerKey = null)
0 ignored issues
show
You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
74
    {
75
        $this->request = $request;
76
        $this->response = $response;
77
        $this->exception = $exception;
78
        $this->token = $token;
79
        $this->providerKey = $providerKey;
80
    }
81
82
    /**
83
     * @return Response
84
     */
85
    public function getResponse()
86
    {
87
        return $this->response;
88
    }
89
90
    /**
91
     * @return Request
92
     */
93
    public function getRequest()
94
    {
95
        return $this->request;
96
    }
97
98
    /**
99
     * @param Response $response
100
     * @return $this
101
     */
102
    public function setResponse(Response $response)
103
    {
104
        $this->response = $response;
105
106
        return $this;
107
    }
108
109
    /**
110
     * @return AuthenticationException|null
111
     */
112
    public function getException()
113
    {
114
        return $this->exception;
115
    }
116
117
    /**
118
     * @return null|TokenInterface
119
     */
120
    public function getToken()
121
    {
122
        return $this->token;
123
    }
124
125
    /**
126
     * @return null|string
127
     */
128
    public function getProviderKey()
129
    {
130
        return $this->providerKey;
131
    }
132
}
133