[ARVADOS] updated: 6ed159925434818e3da1f7ff9f6a777815f2a5a4

git at public.curoverse.com git at public.curoverse.com
Mon Oct 27 11:29:38 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/collections_controller.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

       via  6ed159925434818e3da1f7ff9f6a777815f2a5a4 (commit)
      from  f1eb092c311510b60b8c9b00b64407780e2a0302 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 6ed159925434818e3da1f7ff9f6a777815f2a5a4
Author: radhika <radhika at curoverse.com>
Date:   Mon Oct 27 11:28:19 2014 -0400

    4285: use regexp to prepent ./ to file path

diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index b484df3..e869824 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -146,8 +146,7 @@ class CollectionsController < ApplicationController
       coll = Collection.find(params[:uuid])
     end
 
-    file_name = params[:file]
-    file_name = ('./' + file_name) if (file_name and file_name.include?('/'))
+    file_name = params[:file].andand.sub(/^(\.\/|\/|)/, './')
     if usable_token.nil?
       return  # Response already rendered.
     elsif file_name.nil? or not coll.manifest.has_file?(file_name)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list