fix session client passwd transfer for auto-login
authorKonrad Rosenbaum <konrad@silmor.de>
Sat, 26 Nov 2016 18:24:29 +0000 (19:24 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Sat, 26 Nov 2016 19:55:56 +0000 (20:55 +0100)
Change-Id: I32936d4ba9099fa09c72cdd57304c734f30eaa75

sesscli/scli.cpp
sessman/sman.cpp

index 9d43d03..ee0422c 100644 (file)
@@ -264,6 +264,6 @@ void MSessionClient::login(QString user,QString password)
        if(msocket && msocket->isOpen())
                msocket->write(QString("setuser %1\nsetpasswd %2\nlogin\n")
                        .arg(user)
-                       .arg(password.toUtf8().toBase64())
+                       .arg(QString::fromLatin1(password.toUtf8().toBase64()))
                        .toUtf8());
 }
index 2085a50..40bf458 100644 (file)
@@ -212,7 +212,7 @@ void MSessionManager::readyRead()
                else if(cmd=="setuser")
                        emit setUsername(par.trimmed());
                else if(cmd=="setpasswd")
-                       emit setPassword(QString::fromUtf8(QByteArray::fromBase64(par.trimmed())));
+                       emit setPassword(QString::fromUtf8(QByteArray::fromBase64(par.trimmed().toLatin1())));
                else if(cmd=="login")
                        emit startLogin();
                else