Index: openacs-4/packages/file-storage/file-storage.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v
diff -u -r1.54.2.12 -r1.54.2.13
--- openacs-4/packages/file-storage/file-storage.info 3 Dec 2014 16:23:09 -0000 1.54.2.12
+++ openacs-4/packages/file-storage/file-storage.info 10 Apr 2015 09:52:06 -0000 1.54.2.13
@@ -7,7 +7,7 @@
f
f
-
+
OpenACS
Collaborative document storage
2013-09-08
@@ -17,7 +17,7 @@
2
#file-storage.file-storage#
-
+
Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v
diff -u -r1.67.2.11 -r1.67.2.12
--- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 3 Dec 2014 16:23:10 -0000 1.67.2.11
+++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 10 Apr 2015 09:52:06 -0000 1.67.2.12
@@ -357,6 +357,9 @@
} {
is this a file storage object
} {
+ if {![string is integer -strict $object_id]} {
+ return 0
+ }
return [db_string select_object_p {}]
}
Index: openacs-4/packages/file-storage/www/download-archive/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/download-archive/index.vuh,v
diff -u -r1.5.8.3 -r1.5.8.4
--- openacs-4/packages/file-storage/www/download-archive/index.vuh 28 Nov 2014 15:14:48 -0000 1.5.8.3
+++ openacs-4/packages/file-storage/www/download-archive/index.vuh 10 Apr 2015 09:52:06 -0000 1.5.8.4
@@ -1,3 +1,4 @@
+# -*- Tcl -*-
# file-storage/www/download-archive/index.vuh
ad_page_contract {
@@ -10,7 +11,7 @@
{object_id:naturalnum,optional}
}
-if {([info exists object_id] && $object_id ne "")} {
+if {[info exists object_id] && $object_id ne ""} {
set download_name [fs::get_file_system_safe_object_name -object_id $object_id]
set ext [fs::get_archive_extension]
if {$ext ne ""} {
@@ -22,8 +23,14 @@
}
# convenient way to get the values out of a list
-foreach {object_id download_name} [split [ad_conn path_info] /] {break}
+lassign [split [ad_conn path_info] /] object_id download_name
+# The assignment above might not set the object_id, so set it to a
+# value in that case such it will fail in the object_p test below.
+if {![info exists object_id]} {
+ set object_id ""
+}
+
if {![fs::object_p -object_id $object_id]} {
ad_return_complaint 1 "Object \#$object_id is not a file storage object."
ad_script_abort