Bug 993450
Summary: | Unhandled exception: Long file and path names can cause a path validation exception | ||
---|---|---|---|
Product: | [Retired] Zanata | Reporter: | Damian Jansen <djansen> |
Component: | Component-Logic | Assignee: | Michelle Kim <mkim> |
Status: | CLOSED UPSTREAM | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | development | CC: | mkim, zanata-bugs |
Target Milestone: | --- | Keywords: | screened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-07-29 03:35:04 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 994362 |
Description
Damian Jansen
2013-08-06 00:41:49 UTC
The error message at the moment does not provide enough information for users to know what has gone wrong. It is just "Failed to upload this file." There are several stages we can use to improve user experience around this: 1. Ensure that the error message when this happens indicates that the path+filename length is too great. At this stage the error would still only show after the user has attempted to initiate upload. 2. Add a check in the dialog that will display an error message and disable the upload button whenever the length of path + any filename in the list is greater than 255. 3. Increase the limit on path+filename length. Considerations for determining a sensible limit: - what URL length can be handled by typical user agents (browsers etc.)? - what path+filename length can supported operating systems handle? Some research about path and filename lengths on operating systems indicates that a limit of 255 characters is sensible for the filename on its own, but the limit on total path+filename length could be set as high as 4096 without causing problems on typical Linux systems, and as high as 32k for Windows systems (as long as individual path components should are limited to 255 characters). There is a lot of complexity in this area, so there is no simple solution that will work everywhere. Owncloud use an interesting solution, where clients check that paths are valid for the file system, and for paths that cannot be used they alias the original path to a locally valid path. see: Cross Platform File Handling | owncloud/core : https://github.com/owncloud/core/wiki/Cross-Platform-File-Handling For browsers, a sensible URL length limit is 2000 characters. Since path is used in some of our REST URLs, a limit of 1450 characters or so might be sensible to allow for project and version slug length and other URL components. The other option would be to use something more constrained than path+filename as the REST URL for a document. This would require adjustment to how all the clients use the REST interface, and would probably increase the required number of REST calls since some metadata would be needed to find the id of a document based on its path and filename. see: Top answer: What is the maximum length of a URL in different browsers? http://stackoverflow.com/a/417184/297938 Michelle, I think we should look at implementing step 1. and 2. from the previous comment soon, since they will not take much effort. Step 3 is a lot more complicated, but I think is something we have to address in the long-term. At the moment we are putting too much restriction on filename+path length, so there are many projects in the world that just will not work with Zanata. This will cause more problems as usage of Zanata expands. Even if we just increase the path length limit to 1450 characters, I think it would greatly reduce the amount of projects that cannot work on Zanata. Hi David, Let's bring this up to our backlog grooming meeting to discuss the possible solutions. I am moving this bug to higher in the backlog for discussion. Thanks Michelle Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-333 |