From 51c675359e0ba9f60a258184041441d3563bc042 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sat, 26 Nov 2016 19:24:29 +0100 Subject: [PATCH] fix session client passwd transfer for auto-login Change-Id: I32936d4ba9099fa09c72cdd57304c734f30eaa75 --- sesscli/scli.cpp | 2 +- sessman/sman.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sesscli/scli.cpp b/sesscli/scli.cpp index 9d43d03..ee0422c 100644 --- a/sesscli/scli.cpp +++ b/sesscli/scli.cpp @@ -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()); } diff --git a/sessman/sman.cpp b/sessman/sman.cpp index 2085a50..40bf458 100644 --- a/sessman/sman.cpp +++ b/sessman/sman.cpp @@ -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 -- 1.7.2.5