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.

admin/admin.php (1 issue)

1
<?php
2
// $Id: admin.php,v 1.7 2003/04/11 13:00:53 okazu Exp $
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     {@link https://xoops.org/ XOOPS Project}
15
 * @license       {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
16
 * @author        Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, https://xoops.org/, http://jp.xoops.org/
17
 * @author        XOOPS Development Team
18
 */
19
20
require_once __DIR__ . '/admin_header.php';
21
22
$admin_mydirname = \basename(\dirname(__DIR__));
23
24
$fct = empty($_POST['fct']) ? '' : trim($_POST['fct']);
25
$fct = empty($_GET['fct']) ? $fct : trim($_GET['fct']);
26
if (empty($fct)) {
27
    $fct = 'preferences';
28
}
29
//if (isset($fct) && $fct == "users") {
30
//  $xoopsOption['pagetype'] = "user";
31
//}
32
33
require_once XOOPS_ROOT_PATH . '/kernel/module.php';
34
35
$admintest = 0;
36
37
if (is_object($xoopsUser)) {
38
    $xoopsModule = XoopsModule::getByDirname('system');
39
    if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
40
        redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
41
        exit();
42
    }
43
    $admintest = 1;
44
} else {
45
    redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
46
    exit();
47
}
48
49
// include system category definitions
50
require_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
51
$error = false;
52
if (0 != $admintest) {
0 ignored issues
show
The condition 0 != $admintest is always true.
Loading history...
53
    if (isset($fct) && '' != $fct) {
54
        if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php')) {
55
            xoops_loadLanguage('admin', 'system');
56
            xoops_loadLanguage("admin/$fct", 'system');
57
58
            require XOOPS_ROOT_PATH . '/modules/system/admin/' . $fct . '/xoops_version.php';
59
            /** @var \XoopsGroupPermHandler $grouppermHandler */
60
            $grouppermHandler = xoops_getHandler('groupperm');
61
            $category         = !empty($modversion['category']) ? (int)$modversion['category'] : 0;
62
            unset($modversion);
63
            if ($category > 0) {
64
                $groups = $xoopsUser->getGroups();
65
                if (in_array(XOOPS_GROUP_ADMIN, $groups) || false !== $grouppermHandler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
66
                    //                  if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
67
                    //                      require_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
68
                    if (file_exists("../include/{$fct}.inc.php")) {
69
                        require_once \dirname(__DIR__) . "/include/{$fct}.inc.php";
70
                    } else {
71
                        $error = true;
72
                    }
73
                } else {
74
                    $error = true;
75
                }
76
            } elseif ('version' === $fct) {
77
                if (file_exists(XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php')) {
78
                    require_once XOOPS_ROOT_PATH . '/modules/system/admin/version/main.php';
79
                } else {
80
                    $error = true;
81
                }
82
            } else {
83
                $error = true;
84
            }
85
        } else {
86
            $error = true;
87
        }
88
    } else {
89
        $error = true;
90
    }
91
}
92
93
if (false !== $error) {
94
    xoops_cp_header();
95
    echo '<h4>System Configuration</h4>';
96
    echo '<table class="outer" cellpadding="4" cellspacing="1">';
97
    echo '<tr>';
98
    $groups = $xoopsUser->getGroups();
99
    $all_ok = false;
100
    if (in_array(XOOPS_GROUP_ADMIN, $groups)) {
101
        $all_ok = true;
102
    } else {
103
        /** @var \XoopsGroupPermHandler $grouppermHandler */
104
        $grouppermHandler = xoops_getHandler('groupperm');
105
        $ok_syscats       = $grouppermHandler->getItemIds('system_admin', $groups);
106
    }
107
    $admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
108
    $handle    = opendir($admin_dir);
109
    $counter   = 0;
110
    $class     = 'even';
111
    while ($file = readdir($handle)) {
112
        if ('cvs' !== mb_strtolower($file) && !preg_match('/[.]/', $file) && is_dir($admin_dir . '/' . $file)) {
113
            require $admin_dir . '/' . $file . '/xoops_version.php';
114
            if ($modversion['hasAdmin']) {
115
                $category = isset($modversion['category']) ? (int)$modversion['category'] : 0;
116
                if (false !== $all_ok || in_array($modversion['category'], $ok_syscats)) {
117
                    echo "<td class='$class' align='center' valign='bottom' width='19%'>";
118
                    echo "<a href='" . XOOPS_URL . '/modules/system/admin.php?fct=' . $file . "'><b>" . trim($modversion['name']) . "</b></a>\n";
119
                    echo '</td>';
120
                    $counter++;
121
                    $class = ('even' === $class) ? 'odd' : 'even';
122
                }
123
                if ($counter > 4) {
124
                    $counter = 0;
125
                    echo '</tr>';
126
                    echo '<tr>';
127
                }
128
            }
129
            unset($modversion);
130
        }
131
    }
132
    while ($counter < 5) {
133
        echo '<td class="' . $class . '">&nbsp;</td>';
134
        $class = ('even' === $class) ? 'odd' : 'even';
135
        $counter++;
136
    }
137
    echo '</tr></table>';
138
    xoops_cp_footer();
139
}
140