Issues (1240)

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.

system/libraries/Event_Observer.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 defined('SYSPATH') or die('No direct access allowed.');
2
/**
3
 * Kohana event observer. Uses the SPL observer pattern.
4
 *
5
 * $Id: Event_Observer.php 3769 2008-12-15 00:48:56Z zombor $
6
 *
7
 * @package    Core
8
 * @author     Kohana Team
9
 * @copyright  (c) 2007-2008 Kohana Team
10
 * @license    http://kohanaphp.com/license.html
11
 */
12
abstract class Event_Observer implements SplObserver
13
{
14
15
    // Calling object
16
    protected $caller;
17
18
    /**
19
     * Initializes a new observer and attaches the subject as the caller.
20
     *
21
     * @param   object  Event_Subject
22
     * @return  void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
23
     */
24
    public function __construct(SplSubject $caller)
25
    {
26
        // Update the caller
27
        $this->update($caller);
28
    }
29
30
    /**
31
     * Updates the observer subject with a new caller.
32
     *
33
     * @chainable
34
     * @param   object  Event_Subject
35
     * @return  Event_Observer
36
     */
37
    public function update(SplSubject $caller)
38
    {
39
        if (! ($caller instanceof Event_Subject)) {
40
            throw new Kohana_Exception('event.invalid_subject', get_class($caller), get_class($this));
41
        }
42
43
        // Update the caller
44
        $this->caller = $caller;
45
46
        return $this;
47
    }
48
49
    /**
50
     * Detaches this observer from the subject.
51
     *
52
     * @chainable
53
     * @return  Event_Observer
54
     */
55
    public function remove()
56
    {
57
        // Detach this observer from the caller
58
        $this->caller->detach($this);
59
60
        return $this;
61
    }
62
63
    /**
64
     * Notify the observer of a new message. This function must be defined in
65
     * all observers and must take exactly one parameter of any type.
66
     *
67
     * @param   mixed   message string, object, or array
68
     * @return  void
69
     */
70
    abstract public function notify($message);
71
} // End Event Observer
72