forked from extern/egroupware
correctly handle uid/name-part of path containing #%?
This commit is contained in:
parent
9b8dccb16d
commit
e654d3fbfb
@ -833,7 +833,12 @@ class groupdav extends HTTP_WebDAV_Server
|
||||
$name = basename($file['path']);
|
||||
}
|
||||
|
||||
echo "\t<tr class='$class'>\n\t\t<td>$n</td>\n\t\t<td>".html::a_href(htmlspecialchars($name),'/groupdav.php'.$file['path'])."</td>\n";
|
||||
echo "\t<tr class='$class'>\n\t\t<td>$n</td>\n\t\t<td>".
|
||||
html::a_href(htmlspecialchars($name),'/groupdav.php'.strtr($file['path'], array(
|
||||
'%' => '%25',
|
||||
'#' => '%23',
|
||||
'?' => '%3F',
|
||||
)))."</td>\n";
|
||||
echo "\t\t<td>".$props['DAV:getcontentlength']."</td>\n";
|
||||
echo "\t\t<td>".(!empty($props['DAV:getlastmodified']) ? date('Y-m-d H:i:s',$props['DAV:getlastmodified']) : '')."</td>\n";
|
||||
echo "\t\t<td>".$props['DAV:getetag']."</td>\n";
|
||||
|
@ -484,7 +484,8 @@ abstract class groupdav_handler
|
||||
$type = $this->accounts->get_type($entry['owner']) == 'u' ? 'users' : 'groups';
|
||||
$props['owner'] = HTTP_WebDAV_Server::mkprop('href', $this->base_uri.'/principals/'.$type.'/'.$account_lid.'/');
|
||||
}
|
||||
return $this->groupdav->add_resource($path.$this->get_path($entry), $props, $privileges);
|
||||
// we urldecode here, as HTTP_WebDAV_Server uses a minimal (#?%) urlencoding for incomming pathes and urlencodes pathes in propfind
|
||||
return $this->groupdav->add_resource($path.urldecode($this->get_path($entry)), $props, $privileges);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user