Issues (733)

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/migrate.php (1 issue)

Severity
1
<?php
2
//
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                  Copyright (c) 2000-2020 XOOPS.org                        //
6
//                       <https://xoops.org>                             //
7
//  ------------------------------------------------------------------------ //
8
//  This program is free software; you can redistribute it and/or modify     //
9
//  it under the terms of the GNU General Public License as published by     //
10
//  the Free Software Foundation; either version 2 of the License, or        //
11
//  (at your option) any later version.                                      //
12
//                                                                           //
13
//  You may not change or alter any portion of this comment or credits       //
14
//  of supporting developers from this source code or any supporting         //
15
//  source code which is considered copyrighted (c) material of the          //
16
//  original comment or credit authors.                                      //
17
//                                                                           //
18
//  This program is distributed in the hope that it will be useful,          //
19
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
20
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
21
//  GNU General Public License for more details.                             //
22
//                                                                           //
23
//  You should have received a copy of the GNU General Public License        //
24
//  along with this program; if not, write to the Free Software              //
25
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
26
//  ------------------------------------------------------------------------ //
27
// Author: Kazumi Ono (AKA onokazu)                                          //
28
// URL: http://www.myweb.ne.jp/, https://xoops.org/, http://jp.xoops.org/ //
29
// Project: XOOPS Project                                                    //
30
// ------------------------------------------------------------------------- //
31
32
use Xmf\Request;
33
use XoopsModules\Extcal\{Helper,
34
    Common
35
};
36
37
use Xmf\Module\Admin;
38
39
/** @var Admin $adminObject */
40
41
require __DIR__ . '/admin_header.php';
42
xoops_cp_header();
43
44
$adminObject->displayNavigation(basename(__FILE__));
45
46
echo <<<EOF
47
<form method="post" class="form-inline">
48
<div class="form-group">
49
<input name="show" class="btn btn-default" type="submit" value="Show SQL">
50
</div>
51
<div class="form-group">
52
<input name="migrate" class="btn btn-default" type="submit" value="Do Migration">
53
</div>
54
<div class="form-group">
55
<input name="schema" class="btn btn-default" type="submit" value="Write Schema">
56
</div>
57
</form>
58
EOF;
59
60
//XoopsLoad::load('migrate', 'tdmmoney');
61
62
$configurator = new Common\Configurator();
63
64
$migrator = new Common\Migrate($configurator);
0 ignored issues
show
The call to XoopsModules\Extcal\Common\Migrate::__construct() has too many arguments starting with $configurator. ( Ignorable by Annotation )

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

64
$migrator = /** @scrutinizer ignore-call */ new Common\Migrate($configurator);

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
65
66
$op        = Request::getCmd('op', 'show');
67
$opShow    = Request::getCmd('show', null, 'POST');
68
$opMigrate = Request::getCmd('migrate', null, 'POST');
69
$opSchema  = Request::getCmd('schema', null, 'POST');
70
$op        = !empty($opShow) ? 'show' : $op;
71
$op        = !empty($opMigrate) ? 'migrate' : $op;
72
$op        = !empty($opSchema) ? 'schema' : $op;
73
74
$message = '';
75
76
switch ($op) {
77
    case 'show':
78
    default:
79
        $queue = $migrator->getSynchronizeDDL();
80
        if (!empty($queue)) {
81
            echo "<pre>\n";
82
            foreach ($queue as $line) {
83
                echo $line . ";\n";
84
            }
85
            echo "</pre>\n";
86
        }
87
        break;
88
    case 'migrate':
89
        $migrator->synchronizeSchema();
90
        $message = constant('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_OK');
91
        break;
92
    case 'schema':
93
        xoops_confirm(['op' => 'confirmwrite'], 'migrate.php', constant('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_WARNING'), constant('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM'));
94
        break;
95
    case 'confirmwrite':
96
        if ($GLOBALS['xoopsSecurity']->check()) {
97
            $migrator->saveCurrentSchema();
98
99
            $message = constant('CO_' . $moduleDirNameUpper . '_' . 'MIGRATE_SCHEMA_OK');
100
        }
101
        break;
102
}
103
104
echo "<div>$message</div>";
105
106
require_once __DIR__ . '/admin_footer.php';
107