Issues (1210)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  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.
  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.
  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.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  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.
  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.
  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.
  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.
  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.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  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.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
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/onupdate.inc.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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   {@link http://xoops.org/ XOOPS Project}
14
 * @license     {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
15
 * @package
16
 * @since
17
 * @author       XOOPS Development Team,
18
 * @author       Antiques Promotion (http://www.antiquespromotion.ca)
19
 */
20
21
defined('XOOPS_ROOT_PATH') || exit('XOOPS Root Path not defined');
22
23
// referer check
24
$ref = xoops_getenv('HTTP_REFERER');
25
if ($ref === '' || strpos($ref, XOOPS_URL . '/modules/system/admin.php') === 0) {
26
    /* module specific part */
27
    global $xoopsDB;
28
29
    // 0.75 to 0.76
30
    $result = $GLOBALS['xoopsDB']->query('SELECT event_tz FROM ' . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_event") . ' LIMIT 1');
31
    if ($result) {
32
        list($event_tz) = $GLOBALS['xoopsDB']->fetchRow($result);
33
        if (false === strpos($event_tz, '.')) {
34
            $GLOBALS['xoopsDB']->queryF('ALTER TABLE '
35
                                        . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_event")
36
                                        . ' MODIFY event_tz FLOAT(2,1) NOT NULL DEFAULT 0.0, MODIFY server_tz FLOAT(2,1) NOT NULL DEFAULT 0.0, MODIFY poster_tz FLOAT(2,1) NOT NULL DEFAULT 0.0, ADD KEY (admission), ADD KEY (allday), ADD KEY (START), ADD KEY (END), ADD KEY (start_date), ADD KEY (end_date), ADD KEY (dtstamp), ADD KEY (unique_id), ADD KEY (cid), ADD KEY (event_tz), ADD KEY (server_tz), ADD KEY (poster_tz), ADD KEY (uid), ADD KEY (groupid), ADD KEY (class), ADD KEY (rrule_pid), ADD KEY (categories)');
37
        }
38
    }
39
    // ALTER TABLE xoops_apcal_event MODIFY event_tz smallint(5) NOT NULL default 0, MODIFY server_tz smallint(5) NOT NULL default 0, MODIFY poster_tz smallint(5) NOT NULL default 0, DROP KEY admission, DROP KEY allday, DROP KEY start, DROP KEY end, DROP KEY start_date, DROP KEY end_date, DROP KEY dtstamp, DROP KEY unique_id, DROP KEY cid, DROP KEY event_tz, DROP KEY server_tz, DROP KEY poster_tz, DROP KEY uid, DROP KEY groupid, DROP KEY class, DROP KEY rrule_pid, DROP KEY categories ;
40
41
    // 0.76 to 0.8
42
    $result = $GLOBALS['xoopsDB']->query('SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_plugins") . ' LIMIT 1');
43 View Code Duplication
    if (!$result) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
44
        $GLOBALS['xoopsDB']->queryF('ALTER TABLE '
45
                                    . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_cat")
46
                                    . " CHANGE cat_extkey1 cat_depth TINYINT UNSIGNED NOT NULL DEFAULT 0, ADD cat_style VARCHAR(255) NOT NULL DEFAULT '', ADD KEY (pid), ADD KEY (weight), ADD KEY (cat_depth)");
47
48
        $GLOBALS['xoopsDB']->queryF('CREATE TABLE ' . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_plugins") . " (
49
          pi_id SMALLINT(5) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT,
50
          pi_title VARCHAR(255) NOT NULL DEFAULT '',
51
          pi_type VARCHAR(8) NOT NULL DEFAULT '',
52
          pi_dirname VARCHAR(50) NOT NULL DEFAULT '',
53
          pi_file VARCHAR(50) NOT NULL DEFAULT '',
54
          pi_dotgif VARCHAR(255) NOT NULL DEFAULT '',
55
          pi_options VARCHAR(255) NOT NULL DEFAULT '',
56
          pi_enabled TINYINT NOT NULL DEFAULT 0,
57
          pi_weight SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
58
          last_modified TIMESTAMP ,
59
60
          KEY (pi_weight),
61
          KEY (pi_type),
62
          KEY (pi_dirname),
63
          KEY (pi_file),
64
          KEY (pi_options),
65
          KEY (pi_enabled),
66
          PRIMARY KEY (pi_id)
67
        ) ENGINE=MyISAM ");
68
    }
69
    // DROP TABLE xoops_apcal_plugins ;
70
71
    // 0.8RC to 0.8RC2
72
    $result = $GLOBALS['xoopsDB']->query('SELECT pi_weight FROM ' . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_plugins") . ' LIMIT 1');
73
    if (!$result) {
74
        $GLOBALS['xoopsDB']->queryF('ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix("apcal{$mydirnumber}_plugins") . ' ADD pi_weight SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0, ADD KEY (pi_weight)');
75
    }
76
77
    /* General part */
78
79
    // Keep the values of block's options when module is updated (by nobunobu)
80
    include __DIR__ . '/updateblock.inc.php';
81
}
82