Skip to content

Sanitize summary and URL to prevent malicious attacks#67

Merged
befeleme merged 1 commit into
mainfrom
sanitize_inputs_2
Apr 20, 2026
Merged

Sanitize summary and URL to prevent malicious attacks#67
befeleme merged 1 commit into
mainfrom
sanitize_inputs_2

Conversation

@befeleme
Copy link
Copy Markdown
Owner

Smaller, targeted sanitization. There isn't a good ready-made solution to sanitize these fields. For all the others, packaging.metadata.Metadata instance can be used, which I prepare separately.

@befeleme befeleme mentioned this pull request Apr 17, 2026
Comment thread tests/test_utils.py
@befeleme befeleme force-pushed the sanitize_inputs_2 branch from c9cf4df to 07ad5bb Compare April 20, 2026 12:23
@befeleme befeleme merged commit 0cfa15d into main Apr 20, 2026
6 checks passed
@befeleme befeleme deleted the sanitize_inputs_2 branch April 20, 2026 16:31
@hroncok
Copy link
Copy Markdown
Contributor

hroncok commented Apr 21, 2026

I also failed to find legit use cases that would justify keeping these chunks. Does anybody ever need to put executable bits in the summary and urls?

Imagine you want to reuse the sanitizer from this PR in fedora-python/pyp2rpm#301 -- so you decided to release it on PyPI as a common package called rpm-sanitizer. And in the summary, you write: Replaces dangerous stuff like %(rm -rf) with an escaped form

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.

2 participants