Bug 1127972 - A long unsegmented path + filename length causes an exception
Summary: A long unsegmented path + filename length causes an exception
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: David Mason
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-08 03:05 UTC by Damian Jansen
Modified: 2015-07-29 02:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-29 02:47:22 UTC


Attachments (Terms of Use)

Description Damian Jansen 2014-08-08 03:05:50 UTC
Description of problem:
From https://github.com/zanata/zanata-server/pull/400
The path field is not limited, so a user can enter a path that is greater than the 255 character limit.
This merely causes a IllegalArgumentException that is caught by seam, and displays a "failed to upload" message, but should not be allowed.

Added to that, if the combination of last segment (last index of '/' - end) of the path and the filename length are greater than the standard 255 characters, it should warn that the op is likely to fail.

Version-Release number of selected component (if applicable):
3.4

How reproducible:
Easy always

Steps to Reproduce:
1. Sign in as a maintainer, go to project
2. Click Settings, Documents, then the [+] button
3. Enter a very long (255+) string in the path, that contains no "/" characters 
4. click browse->select a file to upload, click Open
5. Press the upload button

Actual results:
"Failed to upload"
12:36:57,908 WARN  [org.jboss.seam.mock.MockViewHandler] (http-/127.0.0.1:8080-2) You should catch the exception before Seam: java.lang.IllegalArgumentException: no file extension in servlet path: /files/upload

Expected results:
Limited 

Additional info:

Comment 1 Zanata Migrator 2015-07-29 02:47:22 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-193


Note You need to log in before you can comment on or make changes to this bug.