Commit f5c953c2 authored by Peter Simonsson's avatar Peter Simonsson

Follow standard for string handling when sending PASS command

This fixes passwords containing spaces or colons in combination with
at least newer znc.

BUG: 403609
parent 0100930f
......@@ -700,10 +700,10 @@ void Server::socketConnected()
if (getIdentity() && getIdentity()->getAuthType() == QLatin1String("serverpw")
&& !getIdentity()->getAuthPassword().isEmpty())
{
ql << QStringLiteral("PASS ") + getIdentity()->getAuthPassword();
ql << QStringLiteral("PASS :") + getIdentity()->getAuthPassword();
}
else if (!getConnectionSettings().server().password().isEmpty())
ql << QStringLiteral("PASS ") + getConnectionSettings().server().password();
ql << QStringLiteral("PASS :") + getConnectionSettings().server().password();
ql << QStringLiteral("NICK ") + getNickname();
ql << QStringLiteral("USER ") + getIdentity()->getIdent() + QStringLiteral(" 8 * :") /* 8 = +i; 4 = +w */ + getIdentity()->getRealName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment