Remove double base64 encoding on storage
This commit is contained in:
parent
581e92723d
commit
cf7c0699fe
2 changed files with 4 additions and 4 deletions
|
|
@ -337,7 +337,7 @@ bool ConnectionController::InitializePasswordManager()
|
||||||
std::string ConnectionController::getPskId(QUuid connectionid)
|
std::string ConnectionController::getPskId(QUuid connectionid)
|
||||||
{
|
{
|
||||||
std::string id = "dbpw/";
|
std::string id = "dbpw/";
|
||||||
id += connectionid.toString().toUtf8().data();
|
id += connectionid.toString(QUuid::WithBraces).toUtf8().data();
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,8 +202,7 @@ INSERT INTO connection_parameter (connection_uuid, pname, pvalue)
|
||||||
auto& encodedPassword = cc.encodedPassword();
|
auto& encodedPassword = cc.encodedPassword();
|
||||||
if (!encodedPassword.isEmpty())
|
if (!encodedPassword.isEmpty())
|
||||||
{
|
{
|
||||||
b64 = encodedPassword.toBase64(QByteArray::Base64Encoding);
|
stmt.Bind(4, encodedPassword.data(), encodedPassword.length());
|
||||||
stmt.Bind(4, b64.data(), b64.length());
|
|
||||||
}
|
}
|
||||||
stmt.Step();
|
stmt.Step();
|
||||||
|
|
||||||
|
|
@ -272,7 +271,8 @@ void ConnectionTreeModel::loadConnections()
|
||||||
auto cc = std::make_shared<ConnectionConfig>();
|
auto cc = std::make_shared<ConnectionConfig>();
|
||||||
cc->setUuid(QUuid::fromString(stmt.ColumnText(0)));
|
cc->setUuid(QUuid::fromString(stmt.ColumnText(0)));
|
||||||
cc->setName(stmt.ColumnText(1));
|
cc->setName(stmt.ColumnText(1));
|
||||||
cc->setEncodedPassword(stmt.ColumnCharPtr(3));
|
const char* p = stmt.ColumnCharPtr(3);
|
||||||
|
cc->setEncodedPassword(p);
|
||||||
loadConnectionParameters(*cc);
|
loadConnectionParameters(*cc);
|
||||||
|
|
||||||
int group_id = stmt.ColumnInteger(2);
|
int group_id = stmt.ColumnInteger(2);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue