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/upgrade.php (5 issues)

1
<?php
2
3
use Xmf\Request;
4
5
$step = 'default';
6
if (Request::hasVar('step', 'POST')) {
7
    $step = $_POST['step'];
8
}
9
10
require_once __DIR__ . '/admin_header.php';
11
require_once __DIR__ . '/function.php';
12
13
global $xoopsConfig;
14
15
// Change this variable if you use a cloned version of eXtGallery
16
$localModuleDir = 'extcal';
17
18
$moduleName     = 'extcal';
19
$versionFile    = 'http://www.zoullou.net/extcal.version';
20
$downloadServer = 'http://downloads.sourceforge.net/zoullou/';
21
22
$lastVersion       = @file_get_contents($versionFile);
23
$lastVersionString = mb_substr($lastVersion, 0, 1) . '.' . mb_substr($lastVersion, 1, 1) . '.' . mb_substr($lastVersion, 2, 1);
0 ignored issues
show
It seems like $lastVersion can also be of type false; however, parameter $string of mb_substr() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

23
$lastVersionString = mb_substr(/** @scrutinizer ignore-type */ $lastVersion, 0, 1) . '.' . mb_substr($lastVersion, 1, 1) . '.' . mb_substr($lastVersion, 2, 1);
Loading history...
24
$moduleFileName    = $moduleName . '-' . $lastVersionString . '.tar.gz';
25
$langFileName      = $moduleName . '-lang-' . $lastVersionString . '_' . $xoopsConfig['language'] . '.tar.gz';
26
27
switch ($step) {
28
    case 'download':
29
        xoops_cp_header();
30
        adminMenu();
0 ignored issues
show
The function adminMenu was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

30
        /** @scrutinizer ignore-call */ 
31
        adminMenu();
Loading history...
31
        if ($GLOBALS['xoopsModule']->getVar('version') >= $lastVersion) {
32
            echo _AM_EXTCAL_UPDATE_OK;
33
            xoops_cp_footer();
34
            break;
35
        }
36
37
        if (!$handle = @fopen($downloadServer . $moduleFileName, 'r')) {
38
            printf(_AM_EXTCAL_MD_FILE_DONT_EXIST, $downloadServer, $moduleFileName);
39
            xoops_cp_footer();
40
            break;
41
        }
42
        $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, 'w+');
43
44
        // Downlad module archive
45
        if ($handle) {
0 ignored issues
show
$handle is of type resource, thus it always evaluated to false.
Loading history...
46
            while (!feof($handle)) {
47
                $buffer = fread($handle, 8192);
48
                fwrite($localHandle, $buffer);
49
            }
50
            fclose($localHandle);
51
            fclose($handle);
52
        }
53
54
        // English file are included on module package
55
        if ('english' !== $xoopsConfig['language']) {
56
            if (!$handle = @fopen($downloadServer . $langFileName, 'r')) {
57
                printf(_AM_EXTCAL_LG_FILE_DONT_EXIST, $downloadServer, $langFileName);
58
            } else {
59
                $localHandle = @fopen(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, 'w+');
60
                // Download language archive
61
                if ($handle) {
0 ignored issues
show
$handle is of type resource, thus it always evaluated to false.
Loading history...
62
                    while (!feof($handle)) {
63
                        $buffer = fread($handle, 8192);
64
                        fwrite($localHandle, $buffer);
65
                    }
66
                    fclose($localHandle);
67
                    fclose($handle);
68
                }
69
            }
70
        }
71
72
        xoops_confirm(['step' => 'install'], 'upgrade.php', _AM_EXTCAL_DOWN_DONE, _AM_EXTCAL_INSTALL);
73
74
        xoops_cp_footer();
75
76
        break;
77
    case 'install':
78
        xoops_cp_header();
79
        adminMenu();
80
81
        if (!file_exists(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName)) {
82
            echo _AM_EXTCAL_MD_FILE_DONT_EXIST_SHORT;
83
            xoops_cp_footer();
84
85
            break;
86
        }
87
88
        $gPcltarLibDir = XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/class';
89
        require_once dirname(__DIR__) . '/class/pcltar.lib.php';
90
91
        //TrOn(5);
92
93
        // Extract module files
94
        PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
95
        // Delete downloaded module's files
96
        unlink(XOOPS_ROOT_PATH . '/uploads/' . $moduleFileName);
97
98
        if (file_exists(XOOPS_ROOT_PATH . '/uploads/' . $langFileName)) {
99
            // Extract language files
100
            PclTarExtract(XOOPS_ROOT_PATH . '/uploads/' . $langFileName, XOOPS_ROOT_PATH . '/modules/' . $localModuleDir . '/', 'modules/' . $moduleName . '/');
101
            // Delete downloaded module's files
102
            unlink(XOOPS_ROOT_PATH . '/uploads/' . $langFileName);
103
        }
104
105
        // Delete template_c file
106
        $handle = opendir(XOOPS_ROOT_PATH . '/templates_c');
107
        if ($handle) {
0 ignored issues
show
$handle is of type resource, thus it always evaluated to false.
Loading history...
108
            while (false !== ($file = readdir($handle))) {
109
                if ('.' !== $file && '..' !== $file && 'index.html' !== $file) {
110
                    unlink(XOOPS_ROOT_PATH . '/templates_c/' . $file);
111
                }
112
            }
113
114
            closedir($handle);
115
        }
116
        //TrDisplay();
117
118
        xoops_confirm(['dirname' => $localModuleDir, 'op' => 'update_ok', 'fct' => 'modulesadmin'], XOOPS_URL . '/modules/system/admin.php', _AM_EXTCAL_INSTALL_DONE, _AM_EXTCAL_UPDATE);
119
120
        xoops_cp_footer();
121
122
        break;
123
    default:
124
    case 'default':
125
        redirect_header('index.php', 3, '');
126
127
        break;
128
}
129