Description of problem: If a document is uploaded with a specified path, it cannot be opened via the Documents tab in a project version Version-Release number of selected component (if applicable): 3.4 How reproducible: Easy always Steps to Reproduce: 1. Sign in as admin 2. Go to a Project Version, go to Settings, go to Documents 3. Press the +, Upload a document specifying a path for the document 4. Click on the Documents tab, then click on the newly added document Actual results: The languages do not show up in the right hand pane Expected results: List of languages should show Additional info:
The path has to invalid url characters, eg. c:\users\name etc, and the languages tab / web editor will not load correctly or at all.
Required steps to fix: 1. Disallow addition of paths that can escape the project directory (.., etc.) 2. Ensure there is a test that will fail if we accidentally allow addition of these paths again. 3. Migrate existing paths that fit the above pattern that are in the database. 4. Encode paths in URLs.
The more robust solution to this is to remove the ability for users to enter a path when uploading files, and instead allow users to create folders in their project as a separate operation, and upload files into the folders. Folder creation would be a separate step and would enforce sensible folder names.
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-520