From issues-return-15719-archive-asf-public=cust-asf.ponee.io@airavata.apache.org Fri May 31 18:44:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B775F180638 for ; Fri, 31 May 2019 20:44:01 +0200 (CEST) Received: (qmail 82694 invoked by uid 500); 31 May 2019 18:44:01 -0000 Mailing-List: contact issues-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@airavata.apache.org Received: (qmail 82639 invoked by uid 99); 31 May 2019 18:44:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 May 2019 18:44:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5FBF0E2CEE for ; Fri, 31 May 2019 18:44:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1BC842459C for ; Fri, 31 May 2019 18:44:00 +0000 (UTC) Date: Fri, 31 May 2019 18:44:00 +0000 (UTC) From: "Marcus Christie (JIRA)" To: issues@airavata.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AIRAVATA-3055) Handle case where file path is missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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)