SABnzbd can't handle ; (problem with htmlencoded characters)

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
jant90
Newbie
Newbie
Posts: 5
Joined: December 16th, 2015, 8:44 pm

SABnzbd can't handle ; (problem with htmlencoded characters)

Post by jant90 »

I just noticed SABnzbd has trouble when there is a ";" in the NZB filename, so for example "&" (the html encoded & sign). The job name gets cut off at the ; character. I noticed this when Sonarr sent some NZB's to SABnzbd and the job names got corrupt (and this messed up automation down the line).

While the ; character shouldn't be in filenames in the first place (as NZBGeek shouldn't have encoded the & character in the filename), SABnzbd should be able to handle it just fine as it's not an illegal character.

Coincidentally NZBGeek has the exact same problem, when trying to download their NZB's the filename is cut off right at the ; sign. If they just leave the & in there as they should then there wouldn't be any problems in my automated setup either (other Newznab based services do this, e.g. oznzb), it kinda sucks I just got a NZBGeek VIG subscription because of the positive reviews online.

It's very easy to reproduce, but here is my log either way:

Code: Select all

2015-12-17 02:37:43,637::INFO::[__init__:628] Adding "Family.Guy.S09E15.Brothers.&amp
2015-12-17 02:37:43,640::INFO::[misc:811] Creating directories: C:\Users\Administrator\Downloads\incomplete\`Family.Guy.S09E15.Brothers.&amp
2015-12-17 02:37:43,658::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [01/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.par2" yEnc (1/1) added to queue
2015-12-17 02:37:43,661::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [02/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r00" yEnc (1/69) added to queue
2015-12-17 02:37:43,664::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [03/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r01" yEnc (1/69) added to queue
2015-12-17 02:37:43,667::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [04/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r02" yEnc (1/69) added to queue
2015-12-17 02:37:43,671::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [05/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r03" yEnc (1/69) added to queue
2015-12-17 02:37:43,673::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [06/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r04" yEnc (1/69) added to queue
2015-12-17 02:37:43,676::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [07/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r05" yEnc (1/69) added to queue
2015-12-17 02:37:43,677::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [08/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r06" yEnc (1/69) added to queue
2015-12-17 02:37:43,680::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [09/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r07" yEnc (1/69) added to queue
2015-12-17 02:37:43,684::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [10/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r08" yEnc (1/69) added to queue
2015-12-17 02:37:43,686::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [11/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.r09" yEnc (1/23) added to queue
2015-12-17 02:37:43,687::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [12/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.rar" yEnc (1/69) added to queue
2015-12-17 02:37:43,690::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [13/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol00+01.par2" yEnc (1/2) added to queue
2015-12-17 02:37:43,690::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [14/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol01+02.par2" yEnc (1/3) added to queue
2015-12-17 02:37:43,691::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [15/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol03+04.par2" yEnc (1/5) added to queue
2015-12-17 02:37:43,693::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [16/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol07+08.par2" yEnc (1/9) added to queue
2015-12-17 02:37:43,694::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [17/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol15+16.par2" yEnc (1/17) added to queue
2015-12-17 02:37:43,697::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [18/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol31+32.par2" yEnc (1/33) added to queue
2015-12-17 02:37:43,697::INFO::[nzbstuff:444] File [n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD [19/19] - "[n0crypt]Family.Guy.S09E15.Brothers.&.Sisters.720p.WEB-DL.DD5.1.H.264-BHD.vol63+08.par2" yEnc (1/9) added to queue
2015-12-17 02:37:43,697::INFO::[__init__:584] Backing up C:\Users\Administrator\Downloads\incomplete\`Family.Guy.S09E15.Brothers.&amp\__ADMIN__\"Family.Guy.S09E15.Brothers.&amp.nzb.gz
2015-12-17 02:37:43,698::ERROR::[__init__:591] Saving C:\Users\Administrator\Downloads\incomplete\`Family.Guy.S09E15.Brothers.&amp\__ADMIN__\"Family.Guy.S09E15.Brothers.&amp.nzb.gz failed
2015-12-17 02:37:43,698::INFO::[__init__:592] Traceback: 
Traceback (most recent call last):
  File "sabnzbd\__init__.pyo", line 586, in save_compressed
  File "gzip.pyo", line 95, in __init__
IOError: [Errno 2] No such file or directory: '"Family.Guy.S09E15.Brothers.&amp.nzb.gz'
2015-12-17 02:37:43,779::INFO::[newsunpack:1561] Running pre-queue script ['C:\\Users\\Administrator\\Documents\\SabPostProc\\RemoveObfuscated.exe', '`Family.Guy.S09E15.Brothers.&amp', '', 'sonarr', '', '-1', '616746213', 'alt.binaries.boneless', '`Family Guy', '9', '15', 'Brothers &amp']
2015-12-17 02:37:43,799::INFO::[newsunpack:1583] Pre-Q accepts `Family.Guy.S09E15.Brothers.&amp
2015-12-17 02:37:43,802::INFO::[nzbqueue:218] Saving queue
2015-12-17 02:37:43,805::INFO::[__init__:919] Saving data for queue9.sab in C:\Users\Administrator\AppData\Local\sabnzbd\admin\queue9.sab
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SABnzbd can't handle ; (problem with htmlencoded charact

Post by shypike »

Confirmed. I will look into it.

*Edit*
This might be difficult to solve. The problem is in the CherryPy web framework that we use.
Adding the file through the watched folder works fine.
The web framework hands down a mutilated file name.
jant90
Newbie
Newbie
Posts: 5
Joined: December 16th, 2015, 8:44 pm

Re: SABnzbd can't handle ; (problem with htmlencoded charact

Post by jant90 »

Ah that sucks. It sounded like a simple fix, just escape some characters and be up and running again but if it's that deep rooted in the http server then though luck I guess. But I guess CherryPy developers want to have it fixed too so it will be fixed some day (if they're informed of the problem that is).

I guess for now I just have to manually fix it when this occurs (luckily not that often) and hope it will be fixed sometime.

Thanks for looking into it! :)
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: SABnzbd can't handle ; (problem with htmlencoded charact

Post by shypike »

It's definitely a serious problem in CherryPy.
I filed a complaint at its website, so with a bit of luck it will be solved before 2019.
For the time being, I made a primitive patch that solves this particular problem.
It will be included in Beta4.
jant90
Newbie
Newbie
Posts: 5
Joined: December 16th, 2015, 8:44 pm

Re: SABnzbd can't handle ; (problem with htmlencoded charact

Post by jant90 »

Great, thanks! And thank you for all your hard work :).
Post Reply