Skip to content

Commit

Permalink
Remove warning + notice messages in agenda (path disclosure) - refs #…
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Dec 3, 2018
1 parent 5e61c2b commit da8a93e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main/calendar/agenda.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ function add_image_form() {
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;
Expand Down Expand Up @@ -306,6 +311,8 @@ function add_image_form() {
"url" => $url,
"name" => get_lang('Agenda'),
];
} else {
$actionName = '';
}

// Tool introduction
Expand Down

0 comments on commit da8a93e

Please sign in to comment.