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

Whitelist HTTP/HTTPS protocol at runtime #3314

Closed
jcamiel opened this issue Oct 17, 2024 · 0 comments · Fixed by #3319
Closed

Whitelist HTTP/HTTPS protocol at runtime #3314

jcamiel opened this issue Oct 17, 2024 · 0 comments · Fixed by #3319
Assignees
Labels
enhancement New feature or request

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Oct 17, 2024

This Hurl file is not parsable with Hurl 5.0.1:

 GET file:///tmp/foo.txt

If we use a variable this file is OK

GET {{host}}

Run with hurl --variable=file:///tmp/foo.txt

$ hurl --variable=file:///tmp/foo.txt
error: HTTP connection
  --> -:1:5
   |
 1 | GET {{host}}
   |     ^^^^^^^^ could not parse Response
   |

We have an error, but the transfer has happens (it can works with curl). I think we should check protocol, at runtime, with a whilelist http:///https://.

A particular attention is also on following redirection, with this file:

GET http://localhost/foo.txt
[Options]
location: true

We should disallow at runtime any none HTTP/HTTPS transfer (for instance, is during redirection a header Location file:///tmp/foo.txt is sent. On the other hand, we shouldn't have any restriction on Location header value (could be file:///tmp/foo.txt if we don't follow redirection).

Related to #3293

@jcamiel jcamiel added the enhancement New feature or request label Oct 17, 2024
@fabricereix fabricereix self-assigned this Oct 20, 2024
@fabricereix fabricereix linked a pull request Oct 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants