Issues (632)

Security Analysis    not enabled

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

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

Extend/Core/Arch/FrontWidget.php (1 issue)

1
<?php
2
namespace Extend\Core\Arch;
3
4
use Ffcms\Core\App;
5
use Ffcms\Core\Arch\Widget as NativeWidget;
6
use Apps\ActiveRecord\App as AppRecord;
7
use Ffcms\Core\Helper\Type\Str;
8
9
/**
10
 * Class FrontWidget. Special controller type for front widgets.
11
 * @package Extend\Core\Arch
12
 */
13
class FrontWidget extends NativeWidget
14
{
15
    public static $name;
16
17
    /**
18
     * Display widget compiled data.
19
     * @param array|null $params
20
     * @return null|string
21
     */
22
    public static function widget(?array $params = null): ?string
23
    {
24
        if (!self::enabled()) {
25
            return null;
26
        }
27
28
        // call parent method
29
        return parent::widget($params);
30
    }
31
32
    /**
33
     * Check if widget is enabled
34
     * @param string|null $class
35
     * @return bool
36
     */
37
    public static function enabled(?string $class = null): bool
38
    {
39
        self::$class = ($class !== null ? $class : get_called_class()); // get widget classname from passed data or from stacttrace
40
        if (!class_exists(self::$class) && App::$Debug !== null) {
41
            App::$Debug->addMessage(__('Widget autoload is disabled for class: %class%', ['class' => self::$class]));
42
            return false;
43
        }
44
        // get widget name
45
        self::$name = Str::lastIn(self::$class, '\\', true);
46
47
        $wData = AppRecord::getItem('widget', self::$name);
48
        // widget is not founded, deny run
49
        if ($wData === null) {
0 ignored issues
show
The condition $wData === null is always true.
Loading history...
50
            if (App::$Debug !== null) {
51
                App::$Debug->addMessage(__('Widget with name %name%[%class%] is not found', ['name' => self::$name, 'class' => self::$class]));
52
            }
53
            return false;
54
        }
55
56
        // if widget is disabled - lets return nothing
57
        return !(bool)$wData->disabled;
58
    }
59
}
60