Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information