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

DataStore Dump Filename #190

Merged
merged 4 commits into from
Feb 10, 2025
Merged

Conversation

JVickery-TBS
Copy link

feat(views): ds dump filename;

  • Filename for ds dump endpoint.

- Filename for ds dump endpoint.
- Added change log file.
Copy link
Member

@wardi wardi left a comment

Choose a reason for hiding this comment

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

Seems useful, but do we need to worry about special characters, like if I send someone a link to a dump url with filename=../im_in_ur_homedir.lol what will a browser do?

@wardi
Copy link
Member

wardi commented Feb 7, 2025

Also users can choose any file name they like when downloading, so what's the the original problem this is trying to solve? Is this because the default is missing a file extension?

@JVickery-TBS
Copy link
Author

This was for a Recombinant feature to dump CSVs for some admin purposes and data migrations. it just allowed for Recombinant to dump the file as <org name>.<resource name>

And yeah, probably should strip out special characters

Copy link
Member

@wardi wardi left a comment

Choose a reason for hiding this comment

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

Newline characters are definitely bad in the filename. That would let an attacker insert their own headers in the response from the server.

@JVickery-TBS JVickery-TBS merged commit f1b0196 into canada-v2.10 Feb 10, 2025
1 check passed
@JVickery-TBS JVickery-TBS deleted the feature/ds-dump-filename branch February 10, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants