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

Labels
Severity
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 https://xoops.org/ XOOPS Project}
14
 * @license      {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
15
 * @package      extcal
16
 * @since
17
 * @author       XOOPS Development Team,
18
 */
19
20
use XoopsModules\Extcal\{Helper,
21
    Common,
22
    Common\TestdataButtons,
23
    Utility
24
};
25
use Xmf\Request;
26
use Xmf\Yaml;
27
28
/** @var Xmf\Module\Admin $adminObject */
29
/** @var Utility $utility */
30
/** @var Helper $helper */
31
32
require_once __DIR__ . '/admin_header.php';
33
// Display Admin header
34
xoops_cp_header();
35
36
$helper       = Helper::getInstance();
37
$configurator = new Common\Configurator();
38
39
//foreach (array_keys($configurator['uploadFolders']) as $i) {
40
//    $utility::createFolder($configurator['uploadFolders'][$i]);
41
//    $adminObject->addConfigBoxLine($configurator['uploadFolders'][$i], 'folder');
42
//    //    $adminObject->addConfigBoxLine(array($configurator['uploadFolders'][$i], '777'), 'chmod');
43
//}
44
45
//count "total categories"
46
/** @var \XoopsPersistableObjectHandler $categoryHandler */
47
$countCategory = $categoryHandler->getCount();
48
//count "total events"
49
/** @var \XoopsPersistableObjectHandler $eventHandler */
50
$countEvent = $eventHandler->getCount();
51
//count "total eventmembers"
52
/** @var \XoopsPersistableObjectHandler $eventmemberHandler */
53
$countEventmember = $eventmemberHandler->getCount();
54
//count "total eventnotmembers"
55
/** @var \XoopsPersistableObjectHandler $eventNotMemberHandler */
56
$countEventnotmember = $eventNotMemberHandler->getCount();
57
//count "total files"
58
/** @var \XoopsPersistableObjectHandler $fileHandler */
59
$countFile = $fileHandler->getCount();
60
//count "total location"
61
/** @var \XoopsPersistableObjectHandler $locationHandler */
62
$countLocation = $locationHandler->getCount();
63
// InfoBox Statistics
64
$adminObject->addInfoBox(AM_EXTCAL_STATISTICS);
65
66
// InfoBox extcal_cat
67
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_CAT, $countCategory));
68
69
// InfoBox extcal_event
70
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_EVENT, $countEvent));
71
72
// InfoBox extcal_eventmember
73
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_EVENTMEMBER, $countEventmember));
74
75
// InfoBox extcal_eventnotmember
76
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_EVENTNOTMEMBER, $countEventnotmember));
77
78
// InfoBox extcal_file
79
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_FILE, $countFile));
80
81
// InfoBox extcal_location
82
$adminObject->addInfoBoxLine(sprintf(AM_EXTCAL_THEREARE_EXTCAL_LOCATION, $countLocation));
83
// Render Index
84
$adminObject->displayNavigation(basename(__FILE__));
85
86
//check for latest release
87
//$newRelease = $utility::checkVerModule($helper);
88
//if (!empty($newRelease)) {
89
//    $adminObject->addItemButton($newRelease[0], $newRelease[1], 'download', 'style="color : Red"');
90
//}
91
92
93
//***************************************************************************************
94
$pendingEvent = $eventHandler->objectToArray($eventHandler->getPendingEvent(), ['cat_id']);
95
$eventHandler->formatEventsDate($pendingEvent, _SHORTDATESTRING);
96
97
echo '<fieldset><legend style="font-weight:bold; color:#990000;">' . _AM_EXTCAL_PENDING_EVENT . '</legend>';
98
echo '<fieldset><legend style="font-weight:bold; color:#0A3760;">' . _AM_EXTCAL_INFORMATION . '</legend>';
99
echo '<img src=' . $pathIcon16 . '/on.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_APPROVE_PENDING_EVENT . '<br>';
100
echo '<img src=' . $pathIcon16 . '/edit.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_EDIT_PENDING_EVENT . '<br>';
101
echo '<img src=' . $pathIcon16 . '/delete.png>&nbsp;&nbsp;' . _AM_EXTCAL_INFO_DELETE_PENDING_EVENT . '<br>';
102
echo '</fieldset><br>';
103
104
echo '<table class="outer" style="width:100%;">';
105
echo '<tr style="text-align:center;">';
106
echo '<th>' . _AM_EXTCAL_CATEGORY . '</th>';
107
echo '<th>' . _AM_EXTCAL_TITLE . '</th>';
108
echo '<th>' . _AM_EXTCAL_START_DATE . '</th>';
109
echo '<th>' . _AM_EXTCAL_ACTION . '</th>';
110
echo '</tr>';
111
112
if (count($pendingEvent) > 0) {
0 ignored issues
show
It seems like $pendingEvent can also be of type null; however, parameter $value of count() does only seem to accept Countable|array, 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

112
if (count(/** @scrutinizer ignore-type */ $pendingEvent) > 0) {
Loading history...
113
    $i = 0;
114
    foreach ($pendingEvent as $event) {
115
        $class = (0 == ++$i % 2) ? 'even' : 'odd';
116
        echo '<tr style="text-align:center;" class="' . $class . '">';
117
        echo '<td>' . $event['cat']['cat_name'] . '</td>';
118
        echo '<td>' . $event['event_title'] . '</td>';
119
        echo '<td>' . $event['formated_event_start'] . '</td>';
120
        echo '<td style="width:10%; text-align:center;">';
121
        echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/on.png></a>&nbsp;&nbsp;';
122
        echo '<a href="event.php?op=modify&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/edit.png></a>&nbsp;&nbsp;';
123
        echo '<a href="event.php?op=delete&amp;event_id=' . $event['event_id'] . '"><img src=' . $pathIcon16 . '/delete.png></a>';
124
        echo '</td>';
125
        echo '</tr>';
126
    }
127
} else {
128
    echo '<tr><td colspan="4">' . _AM_EXTCAL_NO_PENDING_EVENT . '</td></tr>';
129
}
130
131
echo '</table></fieldset><br>';
132
133
134
//------------- Test Data Buttons ----------------------------
135
if ($helper->getConfig('displaySampleButton')) {
136
    TestdataButtons::loadButtonConfig($adminObject);
137
    $adminObject->displayButton('left', '');;
138
}
139
$op = Request::getString('op', 0, 'GET');
140
switch ($op) {
141
    case 'hide_buttons':
142
        TestdataButtons::hideButtons();
143
        break;
144
    case 'show_buttons':
145
        TestdataButtons::showButtons();
146
        break;
147
}
148
//------------- End Test Data Buttons ----------------------------
149
150
151
$adminObject->displayIndex();
152
echo $utility::getServerStats();
153
154
//codeDump(__FILE__);
155
require __DIR__ . '/admin_footer.php';
156
157
158