Juan Carlos Raña 15 years ago
parent
commit
80afb795f0
2 changed files with 274 additions and 233 deletions
  1. 2 2
      main/inc/lib/document.lib.php
  2. 272 231
      main/inc/lib/main_api.lib.php

+ 2 - 2
main/inc/lib/document.lib.php

@@ -295,11 +295,11 @@ class DocumentManager {
 	 * @param string $name
 	 * @return false if file doesn't exist, true if stream succeeded
 	 */
-	public static function file_send_for_download ($full_file_name, $forced = false, $name = '') {
+	public static function file_send_for_download($full_file_name, $forced = false, $name = '') {
 		if (!is_file($full_file_name)) {
 			return false;
 		}
-		$filename = ($name == '') ? basename($full_file_name) : $name;
+		$filename = ($name == '') ? basename($full_file_name) : replace_dangerous_char($name);
 		$len = filesize($full_file_name);
 
 		if ($forced) {

File diff suppressed because it is too large
+ 272 - 231
main/inc/lib/main_api.lib.php


Some files were not shown because too many files changed in this diff