Issue Details (XML | Word | Printable)

Key: SAK-8566
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Jim Eng
Reporter: Joseph Delaney
Votes: 5
Watchers: 12
Operations

If you were logged in you would be able to see more operations.
Sakai

Broken link in Resources if folder created in WebDAV with apostrophe in name

Created: 05-Mar-2007 09:05   Updated: 26-Jan-2009 12:13
Component/s: Resources, WebDAV
Affects Version/s: 2.4.0, 2.4.1, 2.5.0, 2.5.2, 2.5.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive test.zip (0.7 kB)

Environment: mysql, oracle
Issue Links:
Duplicate
 
Relate
 

2.4.x Status: None
2.5.x Status: None
2.6.x Status: None


 Description  « Hide
If a folder name contains an apostrophe or single-quote and that folder was created or named using WebDAV, then when viewing the site "Resources" the apostrophe ends up in the javascript link without being escaped. This causes the link to fail, a user clicking on the folder name will not be able to access the contents of the folder.

Tested using WebDAV from a Macintosh, and from Windows XP, same results.

Removing the apostrophe from the name only works to restore folder access if it is also done through WebDAV.

Since apostrophes are correctly escaped when items are named within the "Resources" tool, a workaround for people who do most of their work in WebDAV is to create (or rename) the folders without the apostrophes via WebDAV, then use the "Resources" web interface to rename them with the apostrophes.


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jean-François Lévêque (old account) added a comment - 13-Aug-2007 07:08
Checked on qa1-us (svn tags/sakai_2-4-0) using Oracle.

Can't go inside with WebDAV either when the apostrophe is still in the folder name.

Raad Al-Rawi added a comment - 07-Sep-2007 08:29
We are seeing a similar issue when a file is uploaded with either an apostrophe or single quote in the filename, e.g. "St John's College.doc".
This causes all resource functionality to break for this file, because the javascript command is terminated prematurely.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raad Al-Rawi

CARET, University of Cambridge
1st Floor, 16 Mill Lane, Cambridge CB2 1SB

Tel: +44 (0)1223 765395 Fax: +44 (0)1223 765505
Web: http://www.caret.cam.ac.uk

Raad Al-Rawi added a comment - 28-Sep-2007 09:20
I think this issue should be escalated to at least major, because the only way of presently dealing with this is by editing the CONTENT_ERSOURCE record in the database - a last resort indeed!

Christine Doherty added a comment - 12-Oct-2007 18:09
I also think this is a major issue, since WebDav is becoming increasingly popular and it is common for users to put these characters in their file names.

Thomas Amsler added a comment - 10-Jan-2008 21:31
One of our Instructors uploaded a folder via WebDAV containing several documents. The folder name was:

Papers for poster presentations (Assignment #2)

After accessing that folder and its documents via the resources tool, the URLs are not encoded correctly and the user is getting 404 errors:

The "bad" url looks like this:
https://smartsite.ucdavis.edu:8443/access/content/group/e7aace51-c9ad-4983-8051-5fb3733be4f8/Papers%20for%20poster%20presentations%20(Assignment%20#2)/Stookey%20and%20Gonyou%201998.pdf

If you upload the same folder and documents via the resources tool the URLs encode correctly:

https://smartsite.ucdavis.edu:8443/access/content/group/e7aace51-c9ad-4983-8051-5fb3733be4f8/Papers%20for%20poster%20presentations%20(Assignment%20%232)/Stookey%20and%20Gonyou%201998.pdf

What actually seems to happen is that the resources tools turns:

Papers for poster presentations _Assignment _2_

... into:
Papers for poster presentations (Assignment #2)

whereas WebDAV does not.


Matthew Buckett added a comment - 17-Jun-2008 14:57
The 2.5 branch is affected by this issue as can be seen on my test resources page:

http://qa1-nl.sakaiproject.org/portal/site/68a7c03c-342d-49c3-a319-c9f26bfc3bf5/page/e3bc2dd4-f483-4769-87ec-524a9d295e9c

I created this folder (won't work) through WebDAV and you can't expand it (if you have Firebug installed you will see the JS errors).

If you create a file through the resource tool with a quote in it's name the filename gets changed to replace the quote with an underscore and the display name is set to the original name (with quote). The example in my site is work'n fine.

As a side note the unzip feature may also expose this bug but I haven't checked yet.

Matthew Buckett added a comment - 17-Jun-2008 15:06
Zip functionality does also expose this bug. The attached zip has a file with a quote in it which when uncompressed is unmanageable through the Resources tool.

Charles Hedrick added a comment - 26-Jan-2009 12:13
See SAK-15001. I have a fix there.