Issues (48)

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.

app/models/Acl.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
class Acl extends \Phalcon\Mvc\Model
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
6
    /**
7
     *
8
     * @var integer
9
     */
10
    protected $id;
11
12
    /**
13
     *
14
     * @var integer
15
     */
16
    protected $idOperation;
17
18
    /**
19
     *
20
     * @var integer
21
     */
22
    protected $idTypeUser;
23
24
    /**
25
     *
26
     * @var integer
27
     */
28
    protected $idRessource;
29
30
    /**
31
     * Method to set the value of field id
32
     *
33
     * @param integer $id
34
     * @return $this
35
     */
36
    public function setId($id)
37
    {
38
        $this->id = $id;
39
40
        return $this;
41
    }
42
43
    /**
44
     * Method to set the value of field idOperation
45
     *
46
     * @param integer $idOperation
47
     * @return $this
48
     */
49
    public function setIdOperation($idOperation)
50
    {
51
        $this->idOperation = $idOperation;
52
53
        return $this;
54
    }
55
56
    /**
57
     * Method to set the value of field idTypeUser
58
     *
59
     * @param integer $idTypeUser
60
     * @return $this
61
     */
62
    public function setIdTypeUser($idTypeUser)
63
    {
64
        $this->idTypeUser = $idTypeUser;
65
66
        return $this;
67
    }
68
69
    /**
70
     * Method to set the value of field idRessource
71
     *
72
     * @param integer $idRessource
73
     * @return $this
74
     */
75
    public function setIdRessource($idRessource)
76
    {
77
        $this->idRessource = $idRessource;
78
79
        return $this;
80
    }
81
82
    /**
83
     * Returns the value of field id
84
     *
85
     * @return integer
86
     */
87
    public function getId()
88
    {
89
        return $this->id;
90
    }
91
92
    /**
93
     * Returns the value of field idOperation
94
     *
95
     * @return integer
96
     */
97
    public function getIdOperation()
98
    {
99
        return $this->idOperation;
100
    }
101
102
    /**
103
     * Returns the value of field idTypeUser
104
     *
105
     * @return integer
106
     */
107
    public function getIdTypeUser()
108
    {
109
        return $this->idTypeUser;
110
    }
111
112
    /**
113
     * Returns the value of field idRessource
114
     *
115
     * @return integer
116
     */
117
    public function getIdRessource()
118
    {
119
        return $this->idRessource;
120
    }
121
122
    /**
123
     * Initialize method for model.
124
     */
125
    public function initialize()
126
    {
127
        $this->belongsTo('idTypeUser', 'TypeUser', 'id', array('alias' => 'TypeUser'));
128
        $this->belongsTo('idRessource', 'Ressource', 'id', array('alias' => 'Ressource'));
129
        $this->belongsTo('idOperation', 'Operation', 'id', array('alias' => 'Operation'));
130
    }
131
132
    /**
133
     * Returns table name mapped in the model.
134
     *
135
     * @return string
136
     */
137
    public function getSource()
138
    {
139
        return 'acl';
140
    }
141
142
    /**
143
     * Allows to query a set of records that match the specified conditions
144
     *
145
     * @param mixed $parameters
146
     * @return Acl[]
147
     */
148
    public static function find($parameters = null)
149
    {
150
        return parent::find($parameters);
151
    }
152
153
    /**
154
     * Allows to query the first record that match the specified conditions
155
     *
156
     * @param mixed $parameters
157
     * @return Acl
158
     */
159
    public static function findFirst($parameters = null)
160
    {
161
        return parent::findFirst($parameters);
162
    }
163
164
    public function toString(){
165
        return " ".$this->getRessource()->getLibelle()." accessible par ".$this->getTypeUser()->getLibelle()." en droit '".$this->getOperation()->getOperation()."'";
166
    }
167
}