aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbAndroid/dbandroidjsonconnection.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2016-06-13 18:42:57 -0400
commit65d5f68cc6dc81799c5a5d90400a2c1f0dd02547 (patch)
tree6f245ba901b87ef42fed69965aea22f5eea6b590 /Plugins/DbAndroid/dbandroidjsonconnection.cpp
parentaeb6bad01630d325a4e768e798a7a6d44e18fdaf (diff)
parent5d9314f134ddd3dc4c853e398ac90ba247fb2e4f (diff)
Merge tag 'upstream/3.1.0'
Upstream version 3.1.0 # gpg: Signature made Mon 13 Jun 2016 06:42:54 PM EDT using RSA key ID EBE9BD91 # gpg: Good signature from "Unit 193 <unit193@gmail.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.org>" # gpg: aka "Unit 193 <unit193@ubuntu.com>" # gpg: aka "Unit 193 <unit193@ninthfloor.com>"
Diffstat (limited to 'Plugins/DbAndroid/dbandroidjsonconnection.cpp')
-rw-r--r--Plugins/DbAndroid/dbandroidjsonconnection.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/Plugins/DbAndroid/dbandroidjsonconnection.cpp b/Plugins/DbAndroid/dbandroidjsonconnection.cpp
index 05d6469..fb8087e 100644
--- a/Plugins/DbAndroid/dbandroidjsonconnection.cpp
+++ b/Plugins/DbAndroid/dbandroidjsonconnection.cpp
@@ -199,28 +199,12 @@ bool DbAndroidJsonConnection::connectToTcp(const QString& ip, int port)
connectedState = true;
- // Evaluate the connection and send the security token
- static_qstring(pingCmd, "{ping:\"%1\"}");
- QDate date = QDateTime::currentDateTime().date();
- QString tokenString = "06fn43" + QString::number(date.dayOfYear()) + "3ig7ws" + QString::number(date.year()) + "53";
- QByteArray md5 = QCryptographicHash::hash(tokenString.toUtf8(), QCryptographicHash::Md5);
- QByteArray token = md5.toBase64();
-
- QByteArray response = send(pingCmd.arg(QString::fromLatin1(token)).toUtf8());
- if (response != PING_RESPONSE_OK)
- {
- qWarning() << "Connection to" << ip << ":" << port << "has failed, because response to PING was:" << response;
- notifyWarn(tr("Cannot connect to SQLiteStudio service on Android device. The remote service is unavailable or invalid."));
- handleConnectionFailed();
- return false;
- }
-
// Authenticate
QString pass = dbUrl.getPassword();
if (!pass.isEmpty())
{
static_qstring(passPharse, "{auth:\"%1\"}");
- response = send(passPharse.arg(pass.replace("\"", "\\\"")).toUtf8());
+ QByteArray response = send(passPharse.arg(pass.replace("\"", "\\\"")).toUtf8());
if (response != PASS_RESPONSE_OK)
{
notifyWarn(tr("Cannot connect to %1:%2, because password is invalid.").arg(ip, QString::number(port)));