Skip to content

0.62.1: clean and escape file names - #104

Merged
diemol merged 2 commits into
mainfrom
clean-upload-file-names
Oct 28, 2026
Merged

diemol merged 2 commits into
mainfrom
clean-upload-file-names

Conversation

@diemol

@diemol diemol commented Oct 28, 2026

Copy link
Copy Markdown
Member

Clean uploaded file names and escape them in the download lists

Description

File Upload now keeps only letters, digits, dot, dash and underscore in the saved file name. Other characters become _. A name with no letter or digit left is rejected with 422 on the existing upload error page.

File Download and Secure File Download HTML-escape the file names they list and URL-encode the links. Plain names like some-file.txt render exactly as before. The File Uploaded page already escaped the name and still shows the name the user picked.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)

Tasks

  • Clean file names on upload; reject names with no letter or digit
  • Escape names and links on /download and /download_secure
  • Contract specs for cleaned upload names, rejected names and escaped download lists
  • E2E scenario: upload a file with markup in its name, check /download shows it as text
  • Bump VERSION to 0.62.1 and add a changelog entry

Review

  • Tests
  • Documentation
  • CHANGELOG

Deployment Notes

None. The deploy restarts the app, which clears files uploaded on the running site.

🤖 Generated with Claude Code

diemol and others added 2 commits October 28, 2026 19:33
File Upload keeps only letters, digits, dot, dash and underscore in the
saved file name; other characters become "_". Names with no letter or
digit are rejected with 422. File Download and Secure File Download
HTML-escape the names they list and URL-encode the links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@diemol
diemol merged commit 4126619 into main Oct 28, 2026
7 checks passed
@diemol
diemol deleted the clean-upload-file-names branch October 28, 2026 19:14
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