Skip to content

Commit 4b800b0

Browse files
authored
Merge pull request #1822 from drwetter/fix_dot@NODE
Fixes trailing dot error in URL handling (3.0)
2 parents 666a2c4 + b8e76a3 commit 4b800b0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

testssl.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17322,11 +17322,10 @@ prepare_debug() {
1732217322
cat >$TEMPDIR/environment.txt << EOF
1732317323

1732417324

17325-
CVS_REL: $CVS_REL
1732617325
GIT_REL: $GIT_REL
1732717326

1732817327
PID: $$
17329-
commandline: "$CMDLINE"
17328+
commandline: "${CMDLINE[@]}"
1733017329
bash version: ${BASH_VERSINFO[0]}.${BASH_VERSINFO[1]}.${BASH_VERSINFO[2]}
1733117330
status: ${BASH_VERSINFO[4]}
1733217331
machine: ${BASH_VERSINFO[5]}
@@ -17696,7 +17695,6 @@ parse_hn_port() {
1769617695
NODE="$1"
1769717696
NODE="${NODE/https\:\/\//}" # strip "https"
1769817697
NODE="${NODE%%/*}" # strip trailing urlpath
17699-
NODE="${NODE%%.}" # strip trailing "." if supplied
1770017698
if grep -q ':$' <<< "$NODE"; then
1770117699
if grep -wq http <<< "$NODE"; then
1770217700
fatal "\"http\" is not what you meant probably" $ERR_CMDLINE
@@ -17718,6 +17716,7 @@ parse_hn_port() {
1771817716
grep -q ':' <<< "$NODE" && \
1771917717
PORT=$(sed 's/^.*\://' <<< "$NODE") && NODE=$(sed 's/\:.*$//' <<< "$NODE")
1772017718
fi
17719+
NODE="${NODE%%.}" # strip trailing "." if supplied
1772117720

1772217721
# We check for non-ASCII chars now. If there are some we'll try to convert it if IDN/IDN2 is installed
1772317722
# If not, we'll continue. Hoping later that dig can use it. If not the error handler will tell

0 commit comments

Comments
 (0)