1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2024-09-03 20:36:12 +02:00

Sanitize trim($year) input.

To avoid php warning that may lead, depending on php configuration, to tainting of the served page/request output with a php warning.
This commit is contained in:
JocelynDelalande 2015-01-17 11:39:55 +01:00
parent 94e3bec65f
commit 317b4aea7b

View file

@ -8635,7 +8635,7 @@ class iCalUtilityFunctions {
$parno = iCalUtilityFunctions::_existRem( $input['params'], 'VALUE', 'DATE-TIME', $hitval, $parno );
$input['value'] = iCalUtilityFunctions::_timestamp2date( $year, $parno );
}
elseif( 8 <= strlen( trim( $year ))) { // ex. 2006-08-03 10:12:18
elseif( is_string( $year ) && ( 8 <= strlen( trim( $year )))) { // ex. 2006-08-03 10:12:18
if( $localtime ) unset ( $month['VALUE'], $month['TZID'] );
$input['params'] = iCalUtilityFunctions::_setParams( $month, array( 'VALUE' => 'DATE-TIME' ));
if( isset( $input['params']['TZID'] )) {