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

EREGCSC-2267 sanitize file names #1106

Merged
merged 3 commits into from
Dec 15, 2023
Merged

Conversation

thwalker6
Copy link
Contributor

@thwalker6 thwalker6 commented Dec 13, 2023

Resolves # EREGCSC-2267

Description-

Sanitize file names was working a little weird with the django library in place so we are doing a more custom solution.

Certain characters will be removed from file names on a small list. This is similar to the previous method we used.
This pull request changes...

  • File name sanitation

Steps to manually verify this change...

  1. Upload a file name with 'bad' characters to the file repository. Try things like semicolons, exclamation points, , ?, commas. windows doesnt let you put these in there. Try with any of the characters in this list. ";", "!", "?", "", ":", ",", '"', '“', "'", r'/', '\', '-'

After uploading the file on upload it will remove those characters in the file name.

new unit test pass.

@thwalker6 thwalker6 marked this pull request as ready for review December 13, 2023 13:24
Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

@peggles2 peggles2 added the Needs Review This PR needs a code review label Dec 14, 2023
@peggles2 peggles2 self-assigned this Dec 14, 2023
@peggles2 peggles2 added Approved and removed Needs Review This PR needs a code review labels Dec 14, 2023
@thwalker6 thwalker6 merged commit 497cbc3 into main Dec 15, 2023
19 checks passed
@thwalker6 thwalker6 deleted the EREGCSC-2267-Sanitize-file-names branch December 15, 2023 12:16
peggles2 pushed a commit that referenced this pull request Jan 3, 2024
* EREGCSC-2267 sanitize file names

* linter fix

* remove unnecessary comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants