airavata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Christie (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AIRAVATA-3055) Handle case where file path is missing
Date Fri, 31 May 2019 18:44:00 GMT
Marcus Christie created AIRAVATA-3055:
-----------------------------------------

             Summary: Handle case where file path is missing
                 Key: AIRAVATA-3055
                 URL: https://issues.apache.org/jira/browse/AIRAVATA-3055
             Project: Airavata
          Issue Type: Sub-task
          Components: Django Portal
            Reporter: Marcus Christie
            Assignee: Marcus Christie


I'm getting an issue when I test locally and then on django.seagrid.org, using the same backend.
For my local testing the experiment data directory is different than django.seagrid.org and
this causes SuspiciousFileOperation to be thrown:
{noformat}
...
[Fri May 31 18:38:36.244456 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   File
"/data/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/datastore.py",
line 154, in rel_path
[Fri May 31 18:38:36.244459 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   
 full_path = path_(username, file_path)
[Fri May 31 18:38:36.244462 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   File
"/data/portals/django-seagrid/airavata-django-portal/django_airavata/apps/api/datastore.py",
line 160, in path_
[Fri May 31 18:38:36.244465 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   
 return user_data_storage.path(file_path)
[Fri May 31 18:38:36.244468 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   File
"/data/portals/django-seagrid/venv/lib64/python3.4/site-packages/django/core/files/storage.py",
line 405, in path
[Fri May 31 18:38:36.244476 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   
 return safe_join(self.location, name)
[Fri May 31 18:38:36.244479 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   File
"/data/portals/django-seagrid/venv/lib64/python3.4/site-packages/django/utils/_os.py", line
78, in safe_join
[Fri May 31 18:38:36.244482 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740]   
 'component ({})'.format(final_path, base_path))
[Fri May 31 18:38:36.244488 2019] [wsgi:error] [pid 5588] [remote 149.160.157.9:63740] django.core.exceptions.SuspiciousFileOperation:
The joined path (/tmp/experiment-data-dir/marcus/tmp/Gaussian_ej992jq.com) is located outside
of the base path component (/var/www/portals/gateway-user-data/django-seagrid/marcus-user)
{noformat}

I think we just need to catch and log a warning with these SuspiciousFileOperation errors.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message