Skip to content

Conversation

@nOOb3167
Copy link
Contributor

@nOOb3167 nOOb3167 commented Jun 8, 2021

'filter' the 'filename' URL parameter through 'safe_filename' IF it was actually sent with the request

It seems this URL parameter is not always passed by clients.
Out of my two setups, the windows based one does not, which led me to investigate.
git version 2.31.1.windows.1 using ssh to clone a repository with lfs.url=http://... - URL parameter not passed, hitting the failure mode mitigated by this PR
git version 2.31.1 using a local file path to clone a repository with lfs.url=http://... - Everything is fine
I have not investigated yet whether the URL parameter passing differences are by design or by accident, however it seems prudent for the transfer adapter to cleanly handle this case.

'filter' the 'filename' URL parameter through 'safe_filename' IF it was actually sent with the request

It seems this URL parameter is not always passed by clients.
Out of my two setups, the windows based one does not, which led me to investigate.
    git version 2.31.1.windows.1 using ssh to clone a repository with lfs.url=http://...     - URL parameter not passed, hitting the failure mode mitigated by this PR
    git version 2.31.1 using a local file path to clone a repository with lfs.url=http://...   - Everything is fine
I have not investigated yet whether the URL parameter passing differences are by design or by accident, however it seems prudent for the transfer adapter to cleanly handle this case.
Copy link
Contributor

@shevron shevron left a comment

Choose a reason for hiding this comment

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

Looks good

@shevron shevron merged commit 2ad4a4c into datopian:master Jul 9, 2021
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