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

Do not interpret TFTP filename as absolute url. #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ebikt
Copy link

@ebikt ebikt commented Apr 15, 2019

With -http-append-path TFTP request //foo/bar discars path portion of base url and http://foo/bar made request to server foo completely ignoring base url.
This patch validates base url on start and does not interpret TFTP filename in any special way.
It just strips all leading slashes and appends it to base url when -http-append-path is enabled.

Reproducing error on previous version of tftp-http-proxy: curl tftp://localhost/http://example.com/ (provided that tftp-http-proxy has access to internet).

@bwalex
Copy link
Owner

bwalex commented Apr 15, 2019

Looks alright - thanks! I'll give it a spin on my side, hopefully today or tomorrow, and will merge it after that.

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.

3 participants