Issues (1131)

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.

src/logging/LoggerAppender.class.php (3 issues)

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
namespace Agavi\Logging;
3
4
// +---------------------------------------------------------------------------+
5
// | This file is part of the Agavi package.                                   |
6
// | Copyright (c) 2005-2011 the Agavi Project.                                |
7
// |                                                                           |
8
// | For the full copyright and license information, please view the LICENSE   |
9
// | file that was distributed with this source code. You can also view the    |
10
// | LICENSE file online at http://www.agavi.org/LICENSE.txt                   |
11
// |   vi: set noexpandtab:                                                    |
12
// |   Local Variables:                                                        |
13
// |   indent-tabs-mode: t                                                     |
14
// |   End:                                                                    |
15
// +---------------------------------------------------------------------------+
16
17
use Agavi\Core\Context;
18
use Agavi\Util\ParameterHolder;
19
20
/**
21
 * AgaviLoggerAppender allows you to specify a destination for log data and
22
 * provide a custom layout for it, through which all log messages will be
23
 * formatted.
24
 *
25
 * @package    agavi
26
 * @subpackage logging
27
 *
28
 * @author     David Zülke <[email protected]>
29
 * @author     Bob Zoller <[email protected]>
30
 * @copyright  Authors
31
 * @copyright  The Agavi Project
32
 *
33
 * @since      0.10.0
34
 *
35
 * @version    $Id$
36
 */
37 View Code Duplication
abstract class LoggerAppender extends ParameterHolder
0 ignored issues
show
This class 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...
38
{
39
    /**
40
     * @var        Context An Context instance.
41
     */
42
    protected $context = null;
43
44
    /**
45
     * @var        LoggerLayout An LoggerLayout instance.
46
     */
47
    protected $layout = null;
48
49
    /**
50
     * Initialize the object.
51
     *
52
     * @param      Context $context    A Context instance.
53
     * @param      array   $parameters An associative array of initialization parameters.
54
     *
55
     * @author     Bob Zoller <[email protected]>
56
     * @author     David Zülke <[email protected]>
57
     * @since      0.10.0
58
     */
59
    public function initialize(Context $context, array $parameters = array())
60
    {
61
        $this->context = $context;
62
        
63
        $this->setParameters($parameters);
64
    }
65
66
    /**
67
     * Retrieve the current application context.
68
     *
69
     * @return     Context A Context instance.
70
     *
71
     * @author     Sean Kerr <[email protected]>
72
     * @since      0.10.0
73
     */
74
    final public function getContext()
75
    {
76
        return $this->context;
77
    }
78
79
    /**
80
     * Retrieve the layout.
81
     *
82
     * @return     LoggerLayout A Layout instance, if it has been set,
83
     *                               otherwise null.
84
     *
85
     * @author     Sean Kerr <[email protected]>
86
     * @since      0.9.0
87
     */
88
    public function getLayout()
89
    {
90
        return $this->layout;
91
    }
92
93
    /**
94
     * Set the layout.
95
     *
96
     * @param      LoggerLayout $layout A Layout instance.
97
     *
98
     * @return     LoggerAppender
99
     *
100
     * @author     Sean Kerr <[email protected]>
101
     * @since      0.9.0
102
     */
103
    public function setLayout(LoggerLayout $layout)
104
    {
105
        $this->layout = $layout;
106
        return $this;
107
    }
108
109
    /**
110
     * Execute the shutdown procedure.
111
     *
112
     * @author     Sean Kerr <[email protected]>
113
     * @since      0.9.0
114
     */
115
    abstract function shutdown();
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
116
117
    /**
118
     * Write log data to this appender.
119
     *
120
     * @param      LoggerMessage $message Log data to be written.
121
     *
122
     * @author     Sean Kerr <[email protected]>
123
     * @since      0.9.0
124
     */
125
    abstract function write(LoggerMessage $message);
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
126
}
127