* Manage port in submodule refurl
Fix#11304
Signed-off-by: Andrew Thornton <[email protected]>
* fix lint
Signed-off-by: Andrew Thornton <[email protected]>
* URLJoin is causes a cyclic dependency and possibly isn't what what we want anyway
Signed-off-by: Andrew Thornton <[email protected]>
* Protect against leading .. in scp syntax
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
Use combination of url.Parse and regex to parse refURL rather than by
hand with indexes & attempt to check if refURL is from same instance and
adjust output to match.
Also now return empty string instead of our original
guess at URL if we are unable to parse it.
Fixes#1526