FIX : Display private event in summary

Discuss about Group-Office development here

Moderator: Developers

Posts: 50
Joined: Mon Sep 14, 2009 11:38 am
Location: France

FIX : Display private event in summary

Postby ael » Thu Mar 18, 2010 8:59 am


A little bug/info leak exist in the current (3.4.11) version of Group-Office. Private events are correctly displayed as "Private" in the calendar module, however in the calendar portlet no such filtering is done. I think it's cleaner to return filtered data instead of changing what should be displayed with Javascript. As far as I know it doesn't add any side effect.

Here the changes needed in modules/calendar/json.php :

Line 134, add :

Code: Select all

$event_is_private = $event['private']=='1' && $GO_SECURITY->user_id != $event['user_id'];
In the following filling of $unsorted[$index], replace :

name with :

Code: Select all

$event_is_private ? $lang['calendar']['private'] : htmlspecialchars($event['name'],ENT_COMPAT,'UTF-8'),
description with :

Code: Select all

$event_is_private ? $lang['calendar']['private'] : nl2br(htmlspecialchars(String::cut_string($event['description'],$max_description_length), ENT_COMPAT, 'UTF-8')),
private with :

Code: Select all

Attached is the patched file against revision 3.4.11
(40.05 KiB) Downloaded 403 times
Site Admin
Site Admin
Posts: 8354
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch

Re: FIX : Display private event in summary

Postby mschering » Mon Mar 22, 2010 1:07 pm

Thanks, I fixed it.
Best regards,

Merijn Schering

Who is online

Users browsing this forum: No registered users and 2 guests