From: cajus Date: Fri, 27 Jun 2008 07:12:59 +0000 (+0000) Subject: Take care about filenames containing a /. Just use the basename then. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cd5f4de8cfe3b506e563f61dca7f9dae0cccd19f;p=gosa.git Take care about filenames containing a /. Just use the basename then. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11462 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index e9444fbf3..52fe8b791 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2686,6 +2686,11 @@ function send_binary_content($data,$name,$type = "application/octet-stream") header("Content-type: ".$type.""); $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; + + /* Strip name if it is a complete path */ + if (preg_match ("/\//", $name)) { + $name= basename($name); + } /* force download dialog */ if (preg_match('/MSIE 5.5/', $HTTP_USER_AGENT) || preg_match('/MSIE 6.0/', $HTTP_USER_AGENT)) {