Issues (330)

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.

admin/admin.php (1 issue)

Severity
1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright    XOOPS Project (https://xoops.org)
14
 * @license      GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15
 * @author      XOOPS Development Team, Kazumi Ono (AKA onokazu)
16
 */
17
$moduleDirName = \basename(\dirname(__DIR__));
18
19
$fct = empty($_POST['fct']) ? '' : trim($_POST['fct']);
20
$fct = empty($_GET['fct']) ? $fct : trim($_GET['fct']);
21
if (empty($fct)) {
22
    $fct = 'preferences';
23
}
24
25
require \dirname(__DIR__, 3) . '/mainfile.php';
26
27
require XOOPS_ROOT_PATH . '/include/cp_functions.php';
28
29
require_once XOOPS_ROOT_PATH . '/kernel/module.php';
30
//require_once  \dirname(__DIR__) . '/include/gtickets.php';// GIJ
31
32
$admintest = 0;
33
34
if (is_object($xoopsUser)) {
35
    $xoopsModule = XoopsModule::getByDirname('system');
36
    if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
37
        redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
38
    }
39
    $admintest = 1;
40
} else {
41
    redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
42
}
43
44
// include system category definitions
45
require_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
46
$error = false;
47
if (0 != $admintest) {
0 ignored issues
show
The condition 0 != $admintest is always true.
Loading history...
48
    if (isset($fct) && '' != $fct) {
49
        if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) {
50
            xoops_loadLanguage('admin', 'system');
51
            xoops_loadLanguage('admin/' . $fct, 'system');
52
53
            require XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php';
54
            /** @var \XoopsGroupPermHandler $grouppermHandler */
55
            $grouppermHandler = xoops_getHandler('groupperm');
56
            $category         = !empty($modversion['category']) ? (int)$modversion['category'] : 0;
57
            unset($modversion);
58
            if ($category > 0) {
59
                $groups = $xoopsUser->getGroups();
60
                if (in_array(XOOPS_GROUP_ADMIN, $groups)
61
                    || false !== $grouppermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
62
                    if (file_exists(__DIR__ . "/../include/{$fct}.inc.php")) {
63
                        require_once __DIR__ . "/../include/{$fct}.inc.php";
64
                    } else {
65
                        $error = true;
66
                    }
67
                } else {
68
                    $error = true;
69
                }
70
            } elseif ('version' === $fct) {
71
                if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) {
72
                    require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php';
73
                } else {
74
                    $error = true;
75
                }
76
            } else {
77
                $error = true;
78
            }
79
        } else {
80
            $error = true;
81
        }
82
    } else {
83
        $error = true;
84
    }
85
}
86
87
if (false !== $error) {
88
    xoops_cp_header();
89
    echo '<h4>' . _AM_SYSTEM_CONFIG . '</h4>';
90
    echo '<table class="outer" cellpadding="4" cellspacing="1">';
91
    echo '<tr>';
92
    $groups = $xoopsUser->getGroups();
93
    $all_ok = false;
94
    if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
95
        /** @var \XoopsGroupPermHandler $grouppermHandler */
96
        $grouppermHandler = xoops_getHandler('groupperm');
97
        $ok_syscats       = $grouppermHandler->getItemIds('system_admin', $groups);
98
    } else {
99
        $all_ok = true;
100
    }
101
    $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
102
    $handle    = opendir($admin_dir);
103
    $counter   = 0;
104
    $class     = 'even';
105
    while ($file = readdir($handle)) {
106
        if ('cvs' !== mb_strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) {
107
            require_once $admin_dir . '/' . $file . '/xoops_version.php';
108
            if ($modversion['hasAdmin']) {
109
                $category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
110
                if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) {
111
                    echo "<td class='$class' align='center' valign='bottom' width='19%'>";
112
                    echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
113
                    echo '</td>';
114
                    ++$counter;
115
                    $class = ('even' === $class) ? 'odd' : 'even';
116
                }
117
                if ($counter > 4) {
118
                    $counter = 0;
119
                    echo '</tr>';
120
                    echo '<tr>';
121
                }
122
            }
123
            unset($modversion);
124
        }
125
    }
126
    while ($counter < 5) {
127
        echo '<td class="' . $class . '">&nbsp;</td>';
128
        $class = ('even' === $class) ? 'odd' : 'even';
129
        ++$counter;
130
    }
131
    echo '</tr></table>';
132
    xoops_cp_footer();
133
}
134