Skip to content

Fix SABnzbd submission failing when the release title contains quotes - #1000

Open
yzRobo wants to merge 1 commit into
Listenarrs:canaryfrom
yzRobo:fix/sabnzbd-nzb-filename
Open

yzRobo wants to merge 1 commit into
Listenarrs:canaryfrom
yzRobo:fix/sabnzbd-nzb-filename

Conversation

@yzRobo

@yzRobo yzRobo commented Sep 19, 2026

Copy link
Copy Markdown

Summary

Sending an NZB to SABnzbd fails with an ArgumentException when the release
title contains double quotes. The title is used as the multipart upload
filename, and .NET rejects quotes in that header. The existing sanitizer
uses Path.GetInvalidFileNameChars, which strips quotes on Windows but not
on Linux, so this only shows up in Docker.

Changes

Fixed

  • Sanitize the NZB upload filename in SabnzbdAddWorkflow so quotes, backslashes and control characters cannot break the multipart header.

Testing

Reproduced on 1.3.4 canary in Docker with a DrunkenSlug release whose title
contained quotes. Stack trace pointed at SabnzbdAddWorkflow.AddAsync line 48.

Built this branch with the repo Dockerfile and ran it in place of the canary
image on TrueNAS. Sent three releases with quoted titles that previously
failed; all three logged "Successfully added NZB to SABnzbd" and appeared in
the SABnzbd queue with the expected category. No unit test was added.

Notes

SABnzbd takes the job name from the nzbname query parameter, so the
sanitized upload filename has no visible effect.

Release titles containing double quotes caused MultipartFormDataContent.Add
to throw an ArgumentException, so the NZB was never sent to SABnzbd. On
Linux, Path.GetInvalidFileNameChars does not include quotes, so the existing
sanitizer did not catch this.
@yzRobo
yzRobo requested a review from a team September 19, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant