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.

include/update_function.php (1 issue)

1
<?php
2
// $Id$
3
//  ------------------------------------------------------------------------ //
4
//                XOOPS - PHP Content Management System                      //
5
//                    Copyright (c) 2000 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
//
28
29
//error_reporting(E_ALL);
30
31
use XoopsModules\Lexikon\{
32
    Helper,
33
    Common\Configurator,
34
    Utility
35
};
36
37
38
/**
39
 * @param      $module
40
 * @param null $prev_version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $prev_version is correct as it would always require null to be passed?
Loading history...
41
 * @return bool|null
42
 */
43
function xoops_module_update_lexikon($module, $prev_version = null)
44
{
45
    $moduleDirName      = \basename(\dirname(__DIR__));
46
    $moduleDirNameUpper = mb_strtoupper($moduleDirName);
47
48
    $helper       = Helper::getInstance();
49
    $utility      = new Utility();
50
    $configurator = new Configurator();
51
52
    $ret = null;
53
    if ($prev_version < 152) {
54
        $ret = xoops_module_update_lexikon_v152($module);
55
    }
56
    $errors = $module->getErrors();
57
    if (!empty($errors)) {
58
        print_r($errors);
59
    }
60
61
    return $ret;
62
}
63
64
/**
65
 * @param $xoopsModule
66
 * @return bool
67
 */
68
function xoops_module_update_lexikon_v152($xoopsModule)
69
{
70
    /**
71
     * Create default upload directories
72
     */
73
    // Copy base file
74
    $indexFile = XOOPS_UPLOAD_PATH . '/index.html';
75
    $blankFile = XOOPS_UPLOAD_PATH . '/blank.gif';
76
    // Making of uploads/lexikon folder
77
    $p_lexikon = XOOPS_UPLOAD_PATH . '/lexikon';
78
    if (!is_dir($p_lexikon)) {
79
        if (!mkdir($p_lexikon, 0777) && !is_dir($p_lexikon)) {
80
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $p_lexikon));
81
        }
82
        chmod($p_lexikon, 0777);
83
    }
84
    copy($indexFile, $p_lexikon . '/index.html');
85
    // Making of categories folder
86
    $pl_categories = $p_lexikon . '/categories';
87
    if (!is_dir($pl_categories)) {
88
        if (!mkdir($pl_categories, 0777) && !is_dir($pl_categories)) {
89
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $pl_categories));
90
        }
91
        chmod($pl_categories, 0777);
92
    }
93
    copy($indexFile, $pl_categories . '/index.html');
94
95
    $plc_images = $pl_categories . '/images';
96
    if (!is_dir($plc_images)) {
97
        if (!mkdir($plc_images, 0777) && !is_dir($plc_images)) {
98
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $plc_images));
99
        }
100
        chmod($plc_images, 0777);
101
    }
102
    copy($indexFile, $plc_images . '/index.html');
103
    copy($blankFile, $plc_images . '/blank.gif');
104
    // Making of entries folder
105
    $pl_entries = $p_lexikon . '/entries';
106
    if (!is_dir($pl_entries)) {
107
        if (!mkdir($pl_entries, 0777) && !is_dir($pl_entries)) {
108
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $pl_entries));
109
        }
110
        chmod($pl_entries, 0777);
111
    }
112
    copy($indexFile, $pl_entries . '/index.html');
113
114
    $ple_images = $pl_entries . '/images';
115
    if (!is_dir($ple_images)) {
116
        if (!mkdir($ple_images, 0777) && !is_dir($ple_images)) {
117
            throw new \RuntimeException(sprintf('Directory "%s" was not created', $ple_images));
118
        }
119
        chmod($ple_images, 0777);
120
    }
121
    copy($indexFile, $ple_images . '/index.html');
122
    copy($blankFile, $ple_images . '/blank.gif');
123
124
    return true;
125
}
126