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

Argo submit fails with a full-path #509

Closed
shrinandj opened this issue Dec 1, 2017 · 0 comments
Closed

Argo submit fails with a full-path #509

shrinandj opened this issue Dec 1, 2017 · 0 comments
Milestone

Comments

@shrinandj
Copy link
Contributor

 ./go/src/github.com/argoproj/argo/dist/argo submit /Users/shri/ws/go/src/github.com/argoproj/argo/examples/hello-world.yaml
2017/11/30 16:27:42 Get file:///Users/shri/ws/go/src/github.com/argoproj/argo/examples/hello-world.yaml: unsupported protocol scheme "file"

Seems like the IsURL() check is inadequate.

shrinandj pushed a commit to shrinandj/argo that referenced this issue Dec 1, 2017
The IsURL check simply called url.ParseRequestURI and relied on whether it errors
or not to detect whether the given string is a url or not. Turns out that
url.ParseRequestURI does not error out if the given string is a complete
filesystem path /path/to/file.

This commit hardens the IsURL check. It checks whether the returned URL object
by url.ParseRequestURI() has an actual Host component or not. If not, isURL returns
false.

Refs argoproj#509.
@jessesuen jessesuen added this to the M12 milestone Dec 1, 2017
shrinandj pushed a commit that referenced this issue Dec 1, 2017
The IsURL check simply called url.ParseRequestURI and relied on whether it errors
or not to detect whether the given string is a url or not. Turns out that
url.ParseRequestURI does not error out if the given string is a complete
filesystem path /path/to/file.

This commit hardens the IsURL check. It checks whether the returned URL object
by url.ParseRequestURI() has an actual Host component or not. If not, isURL returns
false.

Refs #509.
icecoffee531 pushed a commit to icecoffee531/argo-workflows that referenced this issue Jan 5, 2022
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

No branches or pull requests

2 participants