mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-01 06:19:44 +01:00
Merge pull request #1490 from drwetter/dotasurl_fix
Fix URL when hostname with trailing dot supplied
This commit is contained in:
commit
e9430bdd23
@ -18802,8 +18802,9 @@ parse_hn_port() {
|
||||
SNI="-servername $NODE"
|
||||
URL_PATH=$(sed 's/https:\/\///' <<< "$1" | sed 's/'"${NODE}"'//' | sed 's/.*'"${PORT}"'//') # remove protocol and node part and port
|
||||
URL_PATH=$(sed 's/\/\//\//g' <<< "$URL_PATH") # we rather want // -> /
|
||||
URL_PATH=${URL_PATH%%.} # strip trailing "." so that it is not interpreted as URL
|
||||
[[ -z "$URL_PATH" ]] && URL_PATH="/"
|
||||
debugme echo $URL_PATH
|
||||
debugme echo "URL_PATH: $URL_PATH"
|
||||
return 0 # NODE, URL_PATH, PORT is set now
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user