Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unexpected control codes from ICS files #1537

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

willsowerbutts
Copy link
Contributor

We are running Radicale 3.2.2 as packaged in Debian trixie (Debian package version 3.2.2-1). We have approximately 100 users mostly using Thunderbird.

We have run into a problem where users sometimes upload ICS files that are corrupted. They contain unexpected control codes (ie characters with codepoints below 32 that are not tab, carriage return or line feed). Radicale seems to accept these ICS files and store them verbatim on disk, then later return them to the client software. This leads to Thunderbird refusing to accept the XML that Radicale produces in a 207 Multi-Status response, with Thunderbird giving an "XML Parsing Error: not well-formed" error. Because there are multiple events in a single response a single malformed event can result in a number of well-formed events being effectively ignored by the client software.

We have developed the attached patch which strips out all unexpected control codes from ingested ICS files. When a corrupted ICS file is presented to Radicale by the client software it is fixed on ingest and before any further processing, including storing on disk. This has fixed the problem for us.

I don't believe the scrubbing performed here should negatively affect any well-formed file since they should never contain the control codes that the scrubbing removes.

@pbiering pbiering self-requested a review July 11, 2024 17:34
@pbiering pbiering self-assigned this Jul 11, 2024
@pbiering pbiering added improvement client client related issue labels Jul 11, 2024
@pbiering pbiering added this to the 3.2.x milestone Jul 11, 2024
@pbiering
Copy link
Collaborator

Hmm, makes sense, thank you...looks like more broken clients are out than expected :-(

Copy link
Collaborator

@pbiering pbiering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@pbiering pbiering merged commit bb11278 into Kozea:master Jul 12, 2024
4 of 20 checks passed
@pbiering pbiering modified the milestones: 3.2.x, 3.2.3 Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client related issue improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants