Problem with filename while downloading directory

Need help? Post your questions here.

Moderator: moderators

Problem with filename while downloading directory

Postby bile » Mon Dec 26, 2011 5:31 pm

It appears that double quotes (at least) cause problems when Subsonic is creating a filename for download.

In my case it was: Part_X_-_"Something" and the filename is just Part_X_-_ without even a .zip. I also notice that when you hover over the directory the same truncating occurs.
bile
 
Posts: 45
Joined: Mon Apr 18, 2011 11:36 am

Re: Problem with filename while downloading directory

Postby ytechie » Mon Jan 02, 2012 12:39 am

That is because what is between a pair of quotes is what the value is. Hmmm.... how do I say this?
When the backend is referencing the file, it says "the file name is what is between the pair of quotes."
If the filename contains a quote, then the backend says "hey, what is between the quotes must be the full file name."

I don't think I explained it very well, so you may want to look up "SQL Injections" to get a better feel for why this is happening.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: Problem with filename while downloading directory

Postby bile » Tue Jan 10, 2012 8:51 pm

It's a bug either way. I've just noticed that attempting to update coverart also fails for directories with double quotes. Something isn't being properly escaped.
bile
 
Posts: 45
Joined: Mon Apr 18, 2011 11:36 am

Re: Problem with filename while downloading directory

Postby bile » Fri Feb 17, 2012 3:04 am

Another more serious version of this issue.

Error: unterminated string literal
Source File: http://192.168.0.4:4040/main.view?pathU ... 65726f7322
Line: 1, Column: 20
Source Code:
top.playlist.onPlay('/media/music/D/David_Bowie/Album/1977B=\

When trying to play something from "Heros". Nothing gets queued due to the JS error.
bile
 
Posts: 45
Joined: Mon Apr 18, 2011 11:36 am


Return to Help

Who is online

Users browsing this forum: No registered users and 24 guests