Issues (102)

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.

xoops_version.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
//             --  XoopsHP Module --       Xoops e-Learning System           //
4
//                     Copyright (c) 2005 SUDOW-SOKEN                        //
5
//                      <http://www.mailpark.co.jp/>                         //
6
//  ------------------------------------------------------------------------ //
7
//               Based on XoopsHP1.01 by Yoshi, aka HowardGee.               //
8
//  ------------------------------------------------------------------------ //
9
//  This program is free software; you can redistribute it and/or modify     //
10
//  it under the terms of the GNU General Public License as published by     //
11
//  the Free Software Foundation; either version 2 of the License, or        //
12
//  (at your option) any later version.                                      //
13
//                                                                           //
14
//  You may not change or alter any portion of this comment or credits       //
15
//  of supporting developers from this source code or any supporting         //
16
//  source code which is considered copyrighted (c) material of the          //
17
//  original comment or credit authors.                                      //
18
//                                                                           //
19
//  This program is distributed in the hope that it will be useful,          //
20
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
21
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
22
//  GNU General Public License for more details.                             //
23
//                                                                           //
24
//  You should have received a copy of the GNU General Public License        //
25
//  along with this program; if not, write to the Free Software              //
26
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
27
//  ------------------------------------------------------------------------ //
28
29
if (!defined('XOOPS_ROOT_PATH')) {
30
    die('XOOPS root path not defined');
31
}
32
$mydirname = basename(__DIR__);
33
34
$modversion['name']        = $mydirname;
35
$modversion['version']     = '1.14';
36
$modversion['description'] = _MI_XHP_DESC;
37
$modversion['credits']     = 'The XOOPS Project';
38
$modversion['author']      = 'AWAJI Yoshimasa (http://www.awajis.net/) and Kazuo Sudow (http://www.mailpark.co.jp/)';
39
$modversion['help']        = 'sections.html';
40
$modversion['help']        = 'page=help';
41
$modversion['license']     = 'GNU GPL 2.0 or later';
42
$modversion['license_url'] = 'www.gnu.org/licenses/gpl-2.0.html';
43
$modversion['license']     = 'GPL see LICENSE';
44
$modversion['official']    = 0;
45
$modversion['image']       = 'images/logo_module.png';
46
$modversion['hasMain']     = 1;
47
$modversion['dirname']     = $mydirname;
48
49
$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin';
50
$modversion['icons16']        = '../../Frameworks/moduleclasses/icons/16';
51
$modversion['icons32']        = '../../Frameworks/moduleclasses/icons/32';
52
//about
53
$modversion['release_date']        = '2016/06/17';
54
$modversion['module_website_url']  = 'www.xoops.org';
55
$modversion['module_website_name'] = 'XOOPS';
56
$modversion['module_status']       = 'Beta 2';
57
$modversion['min_php']             = '5.5';
58
$modversion['min_xoops']           = '2.5.8';
59
$modversion['min_admin']           = '1.1';
60
$modversion['min_db']              = array(
61
    'mysql'  => '5.0.7',
62
    'mysqli' => '5.0.7'
63
);
64
65
// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
66
// All tables should not have any prefix!
67
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
68
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
69
70
// Tables created by sql file (without prefix!)
71
include __DIR__ . '/module_prefix.php';
72
$modversion['tables'][0] = $module_prefix . '_quiz';
73
$modversion['tables'][1] = $module_prefix . '_results';
74
$modversion['tables'][2] = $module_prefix . '_sections';
75
$modversion['tables'][3] = $module_prefix . '_config';
76
77
// Install script to add anonymous access on installation
78
$modversion['onInstall'] = 'install_funcs.php';
79
80
// Admin things
81
$modversion['hasAdmin']    = 1;
82
$modversion['system_menu'] = 1;
83
$modversion['adminindex']  = 'admin/index.php';
84
$modversion['adminmenu']   = 'admin/menu.php';
85
86
// Menu
87
$modversion['hasMain'] = 1;
88
89
// Notification
90
$modversion['hasNotification'] = 0;
91
92
// Configs
93
$modversion['config'][1] = array(
94
    'name'        => 'has_license',
95
    'title'       => '_MI_XHP_LICENSE',
96
    'description' => '_MI_XHP_LICENSE_DESC',
97
    'formtype'    => 'yesno',
98
    'valuetype'   => 'int',
99
    'default'     => 0
100
);
101
102
$modversion['config'][2] = array(
103
    'name'        => 'welcome',
104
    'title'       => '_MI_XHP_WELCOME_T',
105
    'description' => '',
106
    'formtype'    => 'text',
107
    'valuetype'   => 'text',
108
    'default'     => _MI_XHP_WELCOME
109
);
110
111
$modversion['config'][3] = array(
112
    'name'        => 'welcome_desc',
113
    'title'       => '_MI_XHP_DESC_T',
114
    'description' => '',
115
    'formtype'    => 'textarea',
116
    'valuetype'   => 'text',
117
    'default'     => _MI_XHP_DESC_N
118
);
119
120
$modversion['config'][4] = array(
121
    'name'        => 'mail_teacher',
122
    'title'       => '_MI_XHP_MAIL_TEACHER',
123
    'description' => '',
124
    'formtype'    => 'yesno',
125
    'valuetype'   => 'int',
126
    'default'     => 1
127
);
128
129
$modversion['config'][5] = array(
130
    'name'        => 'mail_user',
131
    'title'       => '_MI_XHP_MAIL_USER',
132
    'description' => '',
133
    'formtype'    => 'yesno',
134
    'valuetype'   => 'int',
135
    'default'     => 1
136
);
137
138
$modversion['config'][6] = array(
139
    'name'        => 'mail_owner',
140
    'title'       => '_MI_XHP_MAIL_OWNER',
141
    'description' => '',
142
    'formtype'    => 'yesno',
143
    'valuetype'   => 'int',
144
    'default'     => 0
145
);
146
147
$modversion['config'][7] = array(
148
    'name'        => 'max_file_size',
149
    'title'       => '_MI_XHP_MAX_FILE_SIZE',
150
    'description' => '',
151
    'formtype'    => 'text',
152
    'valuetype'   => 'int',
153
    'default'     => 200000
154
);
155
156
$modversion['config'][8] = array(
157
    'name'        => 'default_days',
158
    'title'       => '_MI_XHP_DEF_DAYS',
159
    'description' => '',
160
    'formtype'    => 'text',
161
    'valuetype'   => 'int',
162
    'default'     => 7
163
);
164
165
// Blocks
166
$modversion['blocks'][1]['file']        = 'xhp_block_latest.php';
167
$modversion['blocks'][1]['name']        = _MI_XHP_BLATEST;
168
$modversion['blocks'][1]['description'] = 'Shows latest items';
169
$modversion['blocks'][1]['show_func']   = 'b_XHP_latest_show';
170
$modversion['blocks'][1]['edit_func']   = 'b_XHP_latest_edit';
171
$modversion['blocks'][1]['options']     = "DESC|10|{$mydirname}";
172
$modversion['blocks'][1]['template']    = 'xhp_block_latest.html';
173
174
$modversion['blocks'][2]['file']        = 'xhp_block_ranking.php';
175
$modversion['blocks'][2]['name']        = _MI_XHP_BRANKING;
176
$modversion['blocks'][2]['description'] = 'Shows average ranking';
177
$modversion['blocks'][2]['show_func']   = 'b_XHP_ranking_show';
178
$modversion['blocks'][2]['edit_func']   = 'b_XHP_ranking_edit';
179
$modversion['blocks'][2]['options']     = "DESC|10|85|{$mydirname}";
180
$modversion['blocks'][2]['template']    = 'xhp_block_ranking.html';
181
182
$modversion['blocks'][3]['file']        = 'xhp_block_completed.php';
183
$modversion['blocks'][3]['name']        = _MI_XHP_BCOMPLETED;
184
$modversion['blocks'][3]['description'] = 'Shows completed tasks ranking';
185
$modversion['blocks'][3]['show_func']   = 'b_XHP_completed_show';
186
$modversion['blocks'][3]['edit_func']   = 'b_XHP_completed_edit';
187
$modversion['blocks'][3]['options']     = "DESC|10|1|{$mydirname}";
188
$modversion['blocks'][3]['template']    = 'xhp_block_completed.html';
189
190
$modversion['blocks'][4]['file']        = 'xhp_block_courseranking.php';
191
$modversion['blocks'][4]['name']        = _MI_XHP_BCOURSERANK;
192
$modversion['blocks'][4]['description'] = 'Shows average ranking by course';
193
$modversion['blocks'][4]['show_func']   = 'b_XHP_courseranking_show';
194
$modversion['blocks'][4]['edit_func']   = 'b_XHP_courseranking_edit';
195
$modversion['blocks'][4]['options']     = "DESC|10|20|1|{$mydirname}";
196
$modversion['blocks'][4]['template']    = 'xhp_block_courseranking.html';
197
198
// onUpdate
199
if (!empty($_POST['fct']) && !empty($_POST['op']) && $_POST['fct'] === 'modulesadmin' && $_POST['op'] === 'update_ok'
200
    && $_POST['dirname'] == $modversion['dirname']
201
) {
202
    include __DIR__ . '/include/onupdate.inc.php';
203
}
204