Issues (44)

Security Analysis    no request data  

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.

src/AppserverIo/Routlt/Annotations/Action.php (1 issue)

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
/**
4
 * AppserverIo\Routlt\Annotations\Action
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author     Tim Wagner <[email protected]>
15
 * @copyright  2015 TechDivision GmbH <[email protected]>
16
 * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link       http://github.com/appserver-io/routlt
18
 * @link       http://www.appserver.io
19
 */
20
21
namespace AppserverIo\Routlt\Annotations;
22
23
/**
24
 * Annotation to map a request path info to an action method.
25
 *
26
 * @author     Tim Wagner <[email protected]>
27
 * @copyright  2015 TechDivision GmbH <[email protected]>
28
 * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
29
 * @link       http://github.com/appserver-io/routlt
30
 * @link       http://www.appserver.io
31
 *
32
 * @Annotation
33
 * @Target({"METHOD"})
34
 */
35
class Action
36
{
37
38
    /**
39
     * The value of the name attribute.
40
     *
41
     * @var string
42
     */
43
    protected $name;
44
45
    /**
46
     * The value of the restrictions attribute.
47
     *
48
     * @var string
49
     */
50
    protected $restrictions;
51
52
    /**
53
     * The value of the defaults attribute.
54
     *
55
     * @var string
56
     */
57
    protected $defaults;
58
59
    /**
60
     * The constructor the initializes the instance with the
61
     * data passed with the token.
62
     *
63
     * @param array $values The annotation values
64
     */
65 9 View Code Duplication
    public function __construct(array $values = array())
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
66
    {
67
68
        // set the name attribute, if available
69 9
        if (isset($values[AnnotationKeys::NAME])) {
70 8
            $this->name = $values[AnnotationKeys::NAME];
71 8
        }
72
73
        // set the restrictions attribute, if available
74 9
        if (isset($values[AnnotationKeys::RESTRICTIONS])) {
75
            $this->restrictions = $values[AnnotationKeys::RESTRICTIONS];
76
        }
77
78
        // set the defaults attribute, if available
79 9
        if (isset($values[AnnotationKeys::DEFAULTS])) {
80
            $this->defaults = $values[AnnotationKeys::DEFAULTS];
81
        }
82 9
    }
83
84
    /**
85
     * Returns the value of the name attribute.
86
     *
87
     * @return string|null The annotations name attribute
88
     */
89 9
    public function getName()
90
    {
91 9
        return $this->name;
92
    }
93
94
    /**
95
     * Returns the value of the restrictions attribute.
96
     *
97
     * @return string|null The annotations restrictions attribute
98
     */
99 8
    public function getRestrictions()
100
    {
101 8
        return $this->restrictions;
102
    }
103
104
    /**
105
     * Returns the value of the defaults attribute.
106
     *
107
     * @return string|null The annotations defaults attribute
108
     */
109 8
    public function getDefaults()
110
    {
111 8
        return $this->defaults;
112
    }
113
}
114