Remove warning + notice messages in agenda (path disclosure) - refs #2746

pull/2818/head
Yannick Warnier 7 years ago
parent a2eed8996c
commit e6acfe670d
  1. 9
      main/calendar/agenda.php

@ -81,7 +81,12 @@ $nameTools = get_lang('Agenda');
Event::event_access_tool(TOOL_CALENDAR_EVENT);
if ($type === 'fromjs') {
$id_list = explode('_', $eventId);
// split the "id" parameter only if string and there are _ separators
if (preg_match('/_/', $eventId)) {
$id_list = explode('_', $eventId);
} else {
$id_list = $eventId;
}
$eventId = $id_list[1];
$event_type = $id_list[0];
$event_type = $event_type === 'platform' ? 'admin' : $event_type;
@ -306,6 +311,8 @@ if (!empty($actionName)) {
"url" => $url,
"name" => get_lang('Agenda'),
];
} else {
$actionName = '';
}
// Tool introduction

Loading…
Cancel
Save