airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [13/21] airavata-php-gateway git commit: browse with get parameter
Date Fri, 11 Mar 2016 07:00:29 GMT
browse with get parameter


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/c7df5ffc
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/c7df5ffc
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/c7df5ffc

Branch: refs/heads/master
Commit: c7df5ffc79177a64b2e1ee3d61ae84dcaf1b3111
Parents: e3ef126
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Tue Mar 8 13:09:36 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Tue Mar 8 13:09:36 2016 -0500

----------------------------------------------------------------------
 app/controllers/FilemanagerController.php | 8 +++++++-
 app/routes.php                            | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c7df5ffc/app/controllers/FilemanagerController.php
----------------------------------------------------------------------
diff --git a/app/controllers/FilemanagerController.php b/app/controllers/FilemanagerController.php
index a27ceb5..226a92e 100644
--- a/app/controllers/FilemanagerController.php
+++ b/app/controllers/FilemanagerController.php
@@ -10,7 +10,13 @@ class FilemanagerController extends BaseController
     }
 
     public function browse(){
-    	return View::make("files/browse");
+		//FIXME check for no ../ paths
+		if(Input::has("path") && (0 === strpos(Input::get("path"), Session::get('username')))){
+			$path = Input::get("path");
+		}else{
+			$path = Session::get("username");
+		}
+		return View::make("files/browse",array("path"=>$path));
     }
 
 	public function get(){

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/c7df5ffc/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index adfec7a..bdaba7b 100644
--- a/app/routes.php
+++ b/app/routes.php
@@ -99,7 +99,7 @@ Route::post("experiment/browse", "ExperimentController@browseView");
 
 
 Route::get("download/{username}/{exp_data_dir}/{exp_folder}/{exp_file}", function( $username,
$exp_data_dir, $exp_folder, $exp_file){
-
+    //FIXME check for no ../ paths
     if( $username == Session::get("username")){
         $downloadLink = Config::get('pga_config.airavata')['experiment-data-absolute-path']
. '/' . $username . '/' . $exp_data_dir . "/" . $exp_folder . '/' . $exp_file;
         return Response::download( $downloadLink);


Mime
View raw message