Comma's not filtered as Illegal Character in Folder Names (windows)

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
Mav
Newbie
Newbie
Posts: 4
Joined: December 16th, 2010, 11:22 am

Comma's not filtered as Illegal Character in Folder Names (windows)

Post by Mav »

At first I thought this was a bug in the SABconnect++ extension, because sometimes the chrome extension will send nzbs to SABnzbd+ with a filename that contains a comma. But I missed the "Replace Illegal Characters in Folder Names" switch in SABnzbd+. It is checked, so I guess still using comma's in the path is a bug, clearly SABnzbd+ should have filtered it with that switch checked.

I (wrongly) reported it as a bug of SABconnect++ over here, so I will just copy/paste the info:

What steps will reproduce the problem?
1. Use the sab button of one of these: http://nzbindex.nl/search/?q=supernatural.s04.1080p
2. SABnzbd+ starts downloading them fine (in memory), but can't write the files to disk
(3.) Renaming the entry inside SABnzbd+ doesn't seem to work, I guess that's just to pretty up the list and not to change the actual path.

What is the expected output? What do you see instead?
It looks like the filename of the nzb sent to SABnzbd+ was like this (note comma after GB at the end):

Code: Select all

(1+241) `bd-sns4d1.nfo` - 43,79 GB - Supernatural.S04.1080p.Blu-ray.VC-1.DD.5.1 Disc 1 yEnc (1+1) collection size- 45.53 GB, par.199
SABnzbd+ will use this as the foldername. This can't happen on windows and it will show disk errors like these below, no doubt caused by the comma in the path:

Code: Select all

2010-12-13 14:41:23,826::ERROR::[assembler:126] Disk error on creating file H:\sabnzbd\incomplete\(1+241) `bd-sns4d1.nfo` - 43,79 GB - Supernatural.S04.1080p.Blu-ray.VC-1.DD.5.1 Disc 1 yEnc (1+1) collection size- 45.53 GB, par.199\bd-sns4d1.vol000+01.par2
It will just keep showing these disk errors and basically stop eventually, I'm guessing when it's at the memory limit (I have it set to download to memory because of the 100+mbit download speed).

Version: SABnzbd+ 0.5.6
Using Chrome extension: SABconnect++ 0.4.9
OS: Windows Vista
Install-type: Windows Installer
Are you using IPV6? no
Is the issue reproducible? yes
Last edited by Mav on December 16th, 2010, 1:48 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by shypike »

A comma is a perfectly legal character on Windows.
The folder name is rather ludicrous though.
How does it get into the queue?
Mav
Newbie
Newbie
Posts: 4
Joined: December 16th, 2010, 11:22 am

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by Mav »

What the.. :o seems you're right, could have sworn it was an illegal character. :-\ I think I've also had the same error with a : in the folder path before, which I think is an illegal character. I guess I assumed this time it was the comma, no idea why it would throw the error on this now though.

I've only had this happen with some nzbs from nzbindex.nl, and using the SABconnect++ extension for chrome. Which from what I understand sends nzbs to the API directly?

I guess I'll have to wait for it to happen again to try and figure out what's really causing this.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by shypike »

Is can be that SABConnect sends a job name that's different than the actual NZB file name.
In pre-0.5.6 releases this name wasn't properly filtered, but it should be handled properly by 0.5.6
The path name as such is legal, I can create it on my system.
I see that the drive is H:.  Is this a networked drive or an external drive formatted as FAT32?
These could have different limits than a local NTFS drive.
Mav
Newbie
Newbie
Posts: 4
Joined: December 16th, 2010, 11:22 am

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by Mav »

Yes it does, it sends the full (post)name instead of filename. The extention does have this option for nzbindex.nl and binsearch: "use NZB filename instead of full name as displayed on website". Which did seem to fix it but you end up getting weird abbreviated titles instead of the full name.

My H: is an local NTFS drive, I just have a bunch of them. I'll report back when it happens again and its reproducible.
Vaporizer
Newbie
Newbie
Posts: 2
Joined: January 8th, 2011, 1:27 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by Vaporizer »

I've also had this same problem for some time now but I can't figure out what causes the disk errors.

It is reproducible by adding this nzb via the chrome extension SABconnect++:
http://www.binsearch.info/?q=Stargate+A ... 00&server=

SABnzbd+ then briefly shows that it is fetching the nzb:
Trying to fetch NZB from http://binsearch.info/?action=nzb&52871730=1

In the attached screenshot I added the same nzb file 3 times using different switches.
The first has "replace illegal characters" disabled, the second has it enabled and the third also has "replace spaces with underscores" enabled (which only seems to have effect in the queue since the error doesn't show any underscores)

The strange thing is that I can manually create the folder and file displayed in the errors without any problems.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by shypike »

For some reason SABnzbd tries to use the full URL as a job name.
This is not correct.
I'll look into it.
In the mean time you'll have to rename such jobs manually or save it as a file first.
Last edited by shypike on January 8th, 2011, 2:28 pm, edited 1 time in total.
Vaporizer
Newbie
Newbie
Posts: 2
Joined: January 8th, 2011, 1:27 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by Vaporizer »

In an attempt to fix this at the SABconnect++ end I noticed that it sends not only the filename but also the info about the collection (number of files, size, etc). So in the Stargate Atlantis example it would use this as filename:
Stargate Atlantis Seizoen 4 *WEB DL* - [01/15] - "Stargate Atlantis S04E20 WEB DL.par2" yEnc (1/1)
collection size: 1.48 GB, parts available: 2394 / 2394
- 7 rar files
- 8 par2 files
- 1 nzb file

Which is this in the Binsearch source:

Stargate Atlantis Seizoen 4 *WEB DL* - [01/15] - "Stargate Atlantis S04E20 WEB DL.par2" yEnc (1/1)
collection size: 1.48 GB, parts available: 2394 / 2394- 7 rar files- 8 par2 files- 1 nzb file


When only using the part the disk errors are gone. When only using the part the errors are back, so the problem has to be there. Perhaps it is to long?

Anyway I've submitted a patch to SABconnect++ that should fix this for Binsearch (http://code.google.com/p/sabconnectplus ... tail?id=30), though I guess errors like this still have to be fixed at the SABnzbd+ end. I hope this helps identifying it ;)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Comma's not filtered as Illegal Character in Folder Names (windows)

Post by shypike »

I was assuming you were sending the binsearch URL to SABnzbd.
It looks like that's not the case, because the URL doesn't deliver NZB files, but just a binsearch page with links to NZB's.
The problem is therefore the info that SABconnect++ sends to SABnzbd.
SABnzbd does some basic filtering on the received nzbname parameter of the API call, but to a certain extent.
It's SABconnect that should send decent titles and not some URL-derived gibberish.
The API is less well "protected" then the normal UI.
Post Reply