Issues (62)

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.

include/common.php (1 issue)

Labels
Severity
1
<?php declare(strict_types=1);
2
3
/*
4
 * You may not change or alter any portion of this comment or credits
5
 * of supporting developers from this source code or any supporting source code
6
 * which is considered copyrighted (c) material of the original comment or credit authors.
7
 *
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
 */
12
13
/**
14
 * @copyright    XOOPS Project (https://xoops.org)
15
 * @license      GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
16
 * @author       XOOPS Development Team
17
 */
18
19
use Xmf\Module\Admin;
20
use XoopsModules\Xhttperror;
21
22
require_once dirname(__DIR__) . '/preloads/autoloader.php';
23
24
$moduleDirName      = \basename(\dirname(__DIR__));
25
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
26
27
//define('XHTTPERROR_PATH', XOOPS_ROOT_PATH . '/modules/xhttperror');
28
//define('XHTTPERROR_URL', XOOPS_URL . '/modules/xhttperror');
29
30
// module information
31
//$mod_img       = XHTTPERROR_URL . '/assets/images/xhttperror_slogo.png';
32
//$mod_copyright = "<a href='http://luciorota.altervista.org/xoops/' title='luciorota.altervista.org/xoops' target='_blank'>";
33
//$mod_copyright .= "<img src='" . $mod_img . "' alt='luciorota.altervista.org/xoops'>";
34
//$mod_copyright .= '</a>';
35
36
/** @var \XoopsDatabase $db */
37
/** @var Xhttperror\Helper $helper */
38
/** @var Xhttperror\Utility $utility */
39
$db      = \XoopsDatabaseFactory::getDatabaseConnection();
40
$helper  = Xhttperror\Helper::getInstance();
41
$utility = new Xhttperror\Utility();
42
//$configurator = new Xhttperror\Common\Configurator();
43
44
$helper->loadLanguage('common');
45
46
//handlers
47
//$categoryHandler     = new Xhttperror\CategoryHandler($db);
48
//$downloadHandler     = new Xhttperror\DownloadHandler($db);
49
50
if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
51
    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
52
    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
53
    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
54
    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
55
    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
56
    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
57
    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
58
    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
59
    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
60
    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
61
    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
62
    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
63
    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
64
}
65
66
$pathIcon16 = Admin::iconUrl('', 16);
67
$pathIcon32 = Admin::iconUrl('', 32);
68
//$pathModIcon16 = $helper->getModule()->getInfo('modicons16');
69
//$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
70
71
$icons = [
72
    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
73
    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
74
    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
75
    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
76
    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
77
    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
78
    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
79
    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
80
    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
81
];
82
83
$debug = false;
84
85
// MyTextSanitizer object
86
$myts = \MyTextSanitizer::getInstance();
87
88
if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
89
    require_once $GLOBALS['xoops']->path('class/template.php');
90
    $GLOBALS['xoopsTpl'] = new \XoopsTpl();
91
}
92
93
$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName);
94
// Local icons path
95
if (is_object($helper->getModule())) {
96
    $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
97
    $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
98
99
    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
0 ignored issues
show
Are you sure $pathModIcon16 of type array|string can be used in concatenation? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

99
    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . /** @scrutinizer ignore-type */ $pathModIcon16);
Loading history...
100
    $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
101
}
102