[ 
https://issues.apache.org/jira/browse/AIRAVATA-2176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15602171#comment-15602171
 ] 

ASF GitHub Bot commented on AIRAVATA-2176:
------------------------------------------

GitHub user machristie opened a pull request:

    https://github.com/apache/airavata-php-gateway/pull/26

    AIRAVATA-2176 Sanitizing application input names

    PHP automatically converts '.' and spaces in POST parameter names to
    underscores. This change prevents that by preemptively converting '.'
    and spaces to underscores when assembling the form and likewise when
    reading the values out of the $_POST variable.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/machristie/airavata-php-gateway 
AIRAVATA-2176-file-input-undefined-index

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/airavata-php-gateway/pull/26.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #26
    
----
commit cd084fe04bde45f91103a92f8227b608114d39ef
Author: Marcus Christie <[email protected]>
Date:   2016-10-18T19:06:22Z

    AIRAVATA-2176 Sanitizing application input names
    
    PHP automatically converts '.' and spaces in POST parameter names to
    underscores. This change prevents that by preemptively converting '.'
    and spaces to underscores when assembling the form and likewise when
    reading the values out of the $_POST variable.

----


> Error submitting Phasta job: "Undefined index: Input Configuration"
> -------------------------------------------------------------------
>
>                 Key: AIRAVATA-2176
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2176
>             Project: Airavata
>          Issue Type: Bug
>            Reporter: Marcus Christie
>            Assignee: Marcus Christie
>
> Error message from Phasta PGA
> {noformat}
> ErrorException (E_NOTICE)
> HELP
> Undefined index: Input Configuration
> Open: /var/www/portals/phasta/app/libraries/ExperimentUtilities.php
>  
>                     if ($index >= 0) {
>                         $experimentInput->value =
> $experimentInputs[$index]->value;
>                         $experimentInput->type = $applicationInput->type;
>                     }
>                 }
>             } elseif ($applicationInput->type == DataType::URI) {
>                 if ($_FILES[$applicationInput->name]['name']) {
>                     $file = $_FILES[$applicationInput->name];
>  
> GET Data empty
> POST Data
> experiment-name bar
> experiment-description  
> project foo_95f818ec-8ed7-4771-88b6-cca20b47fcfe
> application chefPhastaLoop_stream_adapt_da5ad62a-6604-4e53-8011-5308ebf41ff6
> Max_Number_of_Timesteps 8
> compute-resource  stampede.tacc.xsede.org_ea585ade-831f-4ad1-91c6-d897fb170e3b
> selected-queue  
> queue-name  development
> node-count  1
> cpu-count 4
> wall-time 30
> total-physical-memory 
> emailAddresses  Array ( [0] => )
> launch  Save and launch
> Files
> Geometric-Model Array ( [name] => translated.smd [type] =>
> application/octet-stream [tmp_name] => /tmp/phpkkLgKw [error] => 0 [size] =>
> 10486 )
> Input_Configuration Array ( [name] => input.config [type] =>
> application/octet-stream [tmp_name] => /tmp/phpusDK70 [error] => 0 [size] =>
> 22100 )
> Mesh-Description-File Array ( [name] => mdsMesh2p.tar.gz [type] =>
> application/x-gzip [tmp_name] => /tmp/php4l4UAv [error] => 0 [size] => 569341 
> )
> Problem-Definition  Array ( [name] => translated.smd [type] =>
> application/octet-stream [tmp_name] => /tmp/phpPrPKk1 [error] => 0 [size] =>
> 10486 )
> Solver-Input-Parameters Array ( [name] => solver.inp [type] =>
> application/octet-stream [tmp_name] => /tmp/phpkVmD5w [error] => 0 [size] =>
> 3566 )
> mesh_adaptation_configuration_file  Array ( [name] => samAdaptLoop.inp [type] 
> =>
> application/octet-stream [tmp_name] => /tmp/phpftVzQ2 [error] => 0 [size] => 
> 150
> )
> Cookies
> laravel_session
> eyJpdiI6IktVNTFKKytNUlgyQ0k5aVZoWG41clE9PSIsInZhbHVlIjoiU1JCbCtRcFlNS0VadFVcLzFmUm4xa0IwMUo4bWRoc2d0ZTlDNW9BdzNQRDYxQnBnRGRYZ2pxUGF0SUh4UEx6RnhLUXk5MjRUZzIycldkeWwxM1hyUm9nPT0iLCJtYWMiOiI0NzEwYzQ5NDk2MTlmOWM4MWI3ZGUyMjY2YjVjODkzYTUwOWZiNzc0NzFkMDM4YzhlNGViYjMyNTMzYTFlZjYyIn0=
> Session empty
> Server/Request Data
> REDIRECT_UNIQUE_ID  WAYz-lk8D6wXO5iu8hKBJQAAAAQ
> REDIRECT_HTTPS  on
> REDIRECT_SSL_TLS_SNI  phasta.scigap.org
> REDIRECT_STATUS 200
> UNIQUE_ID WAYz-lk8D6wXO5iu8hKBJQAAAAQ
> HTTPS on
> SSL_TLS_SNI phasta.scigap.org
> HTTP_HOST phasta.scigap.org
> CONTENT_TYPE  multipart/form-data;
> boundary=----WebKitFormBoundaryr5VfsfI2ymxbcBuq
> HTTP_ORIGIN https://phasta.scigap.org
> HTTP_ACCEPT_ENCODING  gzip, deflate
> HTTP_COOKIE
> laravel_session=eyJpdiI6IktVNTFKKytNUlgyQ0k5aVZoWG41clE9PSIsInZhbHVlIjoiU1JCbCtRcFlNS0VadFVcLzFmUm4xa0IwMUo4bWRoc2d0ZTlDNW9BdzNQRDYxQnBnRGRYZ2pxUGF0SUh4UEx6RnhLUXk5MjRUZzIycldkeWwxM1hyUm9nPT0iLCJtYWMiOiI0NzEwYzQ5NDk2MTlmOWM4MWI3ZGUyMjY2YjVjODkzYTUwOWZiNzc0NzFkMDM4YzhlNGViYjMyNTMzYTFlZjYyIn0%3D
> HTTP_CONNECTION keep-alive
> HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> HTTP_USER_AGENT Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)
> AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
> HTTP_REFERER  https://phasta.scigap.org/experiment/create
> CONTENT_LENGTH  618959
> HTTP_ACCEPT_LANGUAGE  en-us
> PATH  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
> SERVER_SIGNATURE  
> SERVER_SOFTWARE Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
> SERVER_NAME phasta.scigap.org
> SERVER_ADDR 149.165.228.40
> SERVER_PORT 443
> REMOTE_ADDR 67.240.45.25
> DOCUMENT_ROOT /var/www/portals/phasta/public
> REQUEST_SCHEME  https
> CONTEXT_PREFIX  
> CONTEXT_DOCUMENT_ROOT /var/www/portals/phasta/public
> SERVER_ADMIN  root@localhost
> SCRIPT_FILENAME /var/www/portals/phasta/public/index.php
> REMOTE_PORT 60439
> REDIRECT_URL  /experiment/create
> GATEWAY_INTERFACE CGI/1.1
> SERVER_PROTOCOL HTTP/1.1
> REQUEST_METHOD  POST
> QUERY_STRING  
> REQUEST_URI /experiment/create
> SCRIPT_NAME /index.php
> PHP_SELF  /index.php
> REQUEST_TIME_FLOAT  1476801534.032
> REQUEST_TIME  1476801534
> Environment Variables empty
> Registered Handlers
> 0. Whoops\Handler\PrettyPageHandler
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to