Merge pull request #1962 from dcooper16/fix1961

Fix #1961
This commit is contained in:
Dirk Wetter 2021-08-27 09:35:04 +02:00 committed by GitHub
commit 9eaccee776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -20983,8 +20983,6 @@ determine_service() {
ftp|smtp|lmtp|pop3|imap|xmpp|xmpp-server|telnet|ldap|postgres|mysql|nntp) ftp|smtp|lmtp|pop3|imap|xmpp|xmpp-server|telnet|ldap|postgres|mysql|nntp)
STARTTLS="-starttls $protocol" STARTTLS="-starttls $protocol"
if [[ "$protocol" == xmpp ]] || [[ "$protocol" == xmpp-server ]]; then if [[ "$protocol" == xmpp ]] || [[ "$protocol" == xmpp-server ]]; then
# for XMPP, openssl has a problem using -connect $NODEIP:$PORT. thus we use -connect $NODE:$PORT instead!
NODEIP="$NODE"
if [[ -n "$XMPP_HOST" ]]; then if [[ -n "$XMPP_HOST" ]]; then
if ! "$HAS_XMPP"; then if ! "$HAS_XMPP"; then
fatal "Your $OPENSSL does not support the \"-xmpphost\" option" $ERR_OSSLBIN fatal "Your $OPENSSL does not support the \"-xmpphost\" option" $ERR_OSSLBIN
@ -20998,11 +20996,18 @@ determine_service() {
prln_warning " IP address doesn't work for XMPP, trying PTR record $rDNS" prln_warning " IP address doesn't work for XMPP, trying PTR record $rDNS"
# remove trailing . # remove trailing .
NODE=${rDNS%%.} NODE=${rDNS%%.}
NODEIP=${rDNS%%.}
else else
fatal "No DNS supplied and no PTR record available which I can try for XMPP" $ERR_DNSLOOKUP fatal "No DNS supplied and no PTR record available which I can try for XMPP" $ERR_DNSLOOKUP
fi fi
fi fi
if "$HAS_XMPP"; then
# small hack -- instead of changing calls all over the place
STARTTLS="$STARTTLS -xmpphost $NODE"
else
# If the XMPP name cannot be provided using -xmpphost,
# then it needs to be provided to the -connect option
NODEIP="$NODE"
fi
fi fi
if [[ "$protocol" == xmpp-server ]] && ! "$HAS_XMPP_SERVER"; then if [[ "$protocol" == xmpp-server ]] && ! "$HAS_XMPP_SERVER"; then
#FIXME: make use of HAS_XMPP_SERVER2 #FIXME: make use of HAS_XMPP_SERVER2