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.

view_agenda-day.php (3 issues)

1
<?php
2
3
use XoopsModules\Extcal\{Helper,
4
    Utility,
5
    CategoryHandler,
6
    EventHandler,
7
    Time
8
};
9
use Xmf\Request;
10
11
require_once __DIR__ . '/include/constantes.php';
12
$params                                  = ['view' => _EXTCAL_NAV_AGENDA_DAY, 'file' => _EXTCAL_FILE_AGENDA_DAY];
13
$GLOBALS['xoopsOption']['template_main'] = "extcal_view_{$params['view']}.tpl";
14
require_once __DIR__ . '/header.php';
15
16
global $xoopsUser, $xoopsTpl;
17
18
/** @var Time $timeHandler */
19
/** @var CategoryHandler $categoryHandler */
20
/** @var EventHandler $eventHandler */
21
/** @var Helper $helper */
22
$helper = Helper::getInstance();
23
24
/* ========================================================================== */
25
//recupe des variables get
26
$year  = Request::getInt('year', date('Y'), 'GET');
0 ignored issues
show
date('Y') of type string is incompatible with the type integer expected by parameter $default of Xmf\Request::getInt(). ( Ignorable by Annotation )

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

26
$year  = Request::getInt('year', /** @scrutinizer ignore-type */ date('Y'), 'GET');
Loading history...
27
$month = Request::getInt('month', date('n'), 'GET');
28
$day   = Request::getInt('day', date('j'), 'GET');
29
$cat   = Request::getInt('cat', 0, 'GET');
30
/* ========================================================================== */
31
32
//echo "{$params['view']}-{$year}-{$month}-{$day}<hr>extcal_{$params['view']}.html<br>";
33
34
$form = new \XoopsSimpleForm('', 'navigSelectBox', $params['file'], 'get');
35
$form->addElement(getListYears($year, $helper->getConfig('agenda_nb_years_before'), $helper->getConfig('agenda_nb_years_after')));
36
$form->addElement(getListMonths($month));
37
$form->addElement(getListDays($day));
38
$form->addElement(Utility::getListCategories($cat));
39
$form->addElement(new \XoopsFormButton('', '', _SUBMIT, 'submit'));
40
41
//------------------------------------------------------
42
// Assigning the form to the template
43
$form->assign($xoopsTpl);
44
45
$mTranche = $helper->getConfig('agenda_tranche_minutes'); //minutes
46
$hStart   = $helper->getConfig('agenda_start_hour'); //heure debut de journee
47
$hEnd     = $helper->getConfig('agenda_end_hour'); //heure fin de journee
48
$nbJours  = $helper->getConfig('agenda_nb_days_day'); //nombre de jour
49
50
/**********************************************************************/
51
// Retriving events and formatting them
52
//$events = $eventHandler->objectToArray($eventHandler->getEventWeek($day, $month, $year, $cat, $nbJours), array('cat_id'));
53
$criteres = [
54
    'periode'      => _EXTCAL_EVENTS_DAY,
55
    'day'          => $day,
56
    'month'        => $month,
57
    'year'         => $year,
58
    'cat'          => $cat,
59
    'nbJours'      => $nbJours,
60
    'externalKeys' => 'cat_id',
61
];
62
$events   = $eventHandler->getEventsOnPeriode($criteres);
63
/**********************************************************************/
64
$eventsArray = $events;
65
$startDay    = mktime(0, 0, 0, $month, $day, $year);
66
$endDay      = $startDay + _EXTCAL_TS_DAY;
67
// Formating date
68
// $eventHandler->formatEventsDate($events, $helper->getConfig('event_date_year'));
69
//
70
// // Treatment for recurring event
71
//
72
// $eventsArray = [];
73
// foreach ($events as $event) {
74
//     if (!$event['event_isrecur']) {
75
//         // Formating date
76
//         $eventHandler->formatEventDate($event, $helper->getConfig('event_date_week'));
77
//         $eventsArray[] = $event;
78
//     } else {
79
//         $recurEvents = $eventHandler->getRecurEventToDisplay($event, $startDay, $endDay);
80
//         // Formating date
81
//         $eventHandler->formatEventsDate($recurEvents, $helper->getConfig('event_date_week'));
82
//         $eventsArray = array_merge($eventsArray, $recurEvents);
83
//     }
84
// }
85
//
86
// // Sort event array by event start
87
// usort($eventsArray, "orderEvents");
88
// -------------------------------------------------------------------
89
// hack JJD pour affichage agenda
90
// -------------------------------------------------------------------
91
92
//-------------------------------------------------------------------
93
// Assigning events to the template
94
//-------------------------------------------------------------------
95
96
$tAgenda = agenda_getEvents($eventsArray, $startDay, $hStart, $hEnd, $mTranche, $nbJours);
97
//$exp = print_r($eventsArray, true);
98
$exp = print_r($tAgenda, true);
99
//echo "<pre>{$exp}</pre>";
100
101
$xoopsTpl->assign('agenda', $tAgenda);
102
//$xoopsTpl->assign('events', $eventsArray);
103
//-------------------------------------------------------------------
104
105
// Retriving categories
106
$cats = $categoryHandler->objectToArray($categoryHandler->getAllCat($xoopsUser));
107
// Assigning categories to the template
108
$xoopsTpl->assign('cats', $cats);
109
110
// Making navig data
111
$dayCalObj  = new Calendar_Day($year, $month, $day);
112
$pDayCalObj = $dayCalObj->prevDay('object');
113
$nDayCalObj = $dayCalObj->nextDay('object');
114
115
$navig = [
116
    'prev' => [
117
        'uri'  => 'year=' . $pDayCalObj->thisYear() . '&amp;month=' . $pDayCalObj->thisMonth() . '&amp;day=' . $pDayCalObj->thisDay(),
0 ignored issues
show
The method thisYear() does not exist on integer. ( Ignorable by Annotation )

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

117
        'uri'  => 'year=' . $pDayCalObj->/** @scrutinizer ignore-call */ thisYear() . '&amp;month=' . $pDayCalObj->thisMonth() . '&amp;day=' . $pDayCalObj->thisDay(),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
118
        'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $pDayCalObj->getTimestamp()),
119
    ],
120
    'this' => [
121
        'uri'  => 'year=' . $dayCalObj->thisYear() . '&amp;month=' . $dayCalObj->thisMonth() . '&amp;day=' . $dayCalObj->thisDay(),
122
        'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $dayCalObj->getTimestamp()),
123
    ],
124
    'next' => [
125
        'uri'  => 'year=' . $nDayCalObj->thisYear() . '&amp;month=' . $nDayCalObj->thisMonth() . '&amp;day=' . $nDayCalObj->thisDay(),
0 ignored issues
show
The method thisYear() does not exist on integer. ( Ignorable by Annotation )

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

125
        'uri'  => 'year=' . $nDayCalObj->/** @scrutinizer ignore-call */ thisYear() . '&amp;month=' . $nDayCalObj->thisMonth() . '&amp;day=' . $nDayCalObj->thisDay(),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
126
        'name' => $timeHandler->getFormatedDate($helper->getConfig('nav_date_day'), $nDayCalObj->getTimestamp()),
127
    ],
128
];
129
130
// Title of the page
131
$xoopsTpl->assign('xoops_pagetitle', $helper->getModule()->getVar('name') . ' ' . $navig['this']['name']);
132
133
// Assigning navig data to the template
134
$xoopsTpl->assign('navig', $navig);
135
136
//Display tooltip
137
$xoopsTpl->assign('showInfoBulle', $helper->getConfig('showInfoBulle'));
138
$xoopsTpl->assign('showId', $helper->getConfig('showId'));
139
140
// Assigning current form navig data to the template
141
$xoopsTpl->assign('selectedCat', $cat);
142
$xoopsTpl->assign('year', $year);
143
$xoopsTpl->assign('month', $month);
144
$xoopsTpl->assign('day', $day);
145
$xoopsTpl->assign('params', $params);
146
147
$tNavBar = getNavBarTabs($params['view']);
148
$xoopsTpl->assign('tNavBar', $tNavBar);
149
$xoopsTpl->assign('list_position', $helper->getConfig('list_position'));
150
151
// echoArray($tNavBar,true);
152
153
//mb missing for xBootstrap templates by Angelo
154
$lang = [
155
    'start'      => _MD_EXTCAL_START,
156
    'end'        => _MD_EXTCAL_END,
157
    'calmonth'   => _MD_EXTCAL_NAV_CALMONTH,
158
    'calweek'    => _MD_EXTCAL_NAV_CALWEEK,
159
    'year'       => _MD_EXTCAL_NAV_YEAR,
160
    'month'      => _MD_EXTCAL_NAV_MONTH,
161
    'week'       => _MD_EXTCAL_NAV_WEEK,
162
    'day'        => _MD_EXTCAL_NAV_DAY,
163
    'agendaweek' => _MD_EXTCAL_NAV_AGENDA_WEEK,
164
    'agendaday'  => _MD_EXTCAL_NAV_AGENDA_DAY,
165
    'search'     => _MD_EXTCAL_NAV_SEARCH,
166
    'newevent'   => _MD_EXTCAL_NAV_NEW_EVENT,
167
];
168
// Assigning language data to the template
169
$xoopsTpl->assign('lang', $lang);
170
$xoopsTpl->assign('view', 'agendaday');
171
172
require_once XOOPS_ROOT_PATH . '/footer.php';
173