[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [networkmanagement] /: Ideally, SECRET_TAG and TLS_AUTH_TAG should contain 2 parameters, second
From: Lamarque V. Souza <lamarque () kde ! org>
Date: 2012-09-30 21:52:48
Message-ID: 20120930215248.2937DA605D () git ! kde ! org
[Download RAW message or body]
Git commit 0541202a63d1dc03314e06caa69dc796469c3e86 by Lamarque V. Souza, on behalf \
of Rajeesh K Nambiar. Committed on 30/09/2012 at 23:47.
Pushed by lvsouza into branch 'master'.
Ideally, SECRET_TAG and TLS_AUTH_TAG should contain 2 parameters, second
one being the direction (in/out) assuming values 0 or 1 respectively.
Added another check to ensure that the 2nd parameter is present before
accessing that index.
BUG: 307517
FIXED-IN: 0.9.0.5
M +1 -1 plasma_nm_version.h
M +10 -6 vpnplugins/openvpn/openvpn.cpp
http://commits.kde.org/networkmanagement/0541202a63d1dc03314e06caa69dc796469c3e86
diff --git a/plasma_nm_version.h b/plasma_nm_version.h
index 2020bcd..f74b286 100644
--- a/plasma_nm_version.h
+++ b/plasma_nm_version.h
@@ -1,4 +1,4 @@
#ifndef PLASMA_NM_VERSION_H
#define PLASMA_NM_VERSION_H
-static const char * plasmaNmVersion = "0.9.1_rc1 (master 20120925)";
+static const char * plasmaNmVersion = "0.9.1_rc1 (master 20120930)";
#endif
diff --git a/vpnplugins/openvpn/openvpn.cpp b/vpnplugins/openvpn/openvpn.cpp
index 1a71a09..993db15 100644
--- a/vpnplugins/openvpn/openvpn.cpp
+++ b/vpnplugins/openvpn/openvpn.cpp
@@ -385,18 +385,22 @@ QVariantList OpenVpnUiPlugin::importConnectionSettings(const \
QString &fileName) if (key_value[0] == SECRET_TAG && key_value.count() > 1) {
key_value[1] = line.right(line.length() - line.indexOf(QRegExp("\\s"))); \
// Get whole string after key
dataMap.insert(QLatin1String(NM_OPENVPN_KEY_STATIC_KEY), \
unQuote(key_value[1], fileName));
- key_value[2] = key_value[1];
- if (!key_value[2].isEmpty() && (key_value[2].toLong() == 0 \
||key_value[2].toLong() == 1))
- dataMap.insert(QLatin1String(NM_OPENVPN_KEY_STATIC_KEY_DIRECTION), \
key_value[2]); + if (key_value.count() > 2) {
+ key_value[2] = key_value[1];
+ if (!key_value[2].isEmpty() && (key_value[2].toLong() == 0 \
||key_value[2].toLong() == 1)) + \
dataMap.insert(QLatin1String(NM_OPENVPN_KEY_STATIC_KEY_DIRECTION), key_value[2]); + \
} have_sk = true;
continue;
}
if (key_value[0] == TLS_AUTH_TAG && key_value.count() >1) {
key_value[1] = line.right(line.length() - line.indexOf(QRegExp("\\s"))); \
// Get whole string after key
dataMap.insert(QLatin1String(NM_OPENVPN_KEY_TA), unQuote(key_value[1], \
fileName));
- key_value[2] = key_value[1];
- if (!key_value[2].isEmpty() && (key_value[2].toLong() == 0 \
||key_value[2].toLong() == 1))
- dataMap.insert(QLatin1String(NM_OPENVPN_KEY_TA_DIR), key_value[2]);
+ if (key_value.count() > 2) {
+ key_value[2] = key_value[1];
+ if (!key_value[2].isEmpty() && (key_value[2].toLong() == 0 \
||key_value[2].toLong() == 1)) + \
dataMap.insert(QLatin1String(NM_OPENVPN_KEY_TA_DIR), key_value[2]); + }
continue;
}
if (key_value[0] == CIPHER_TAG) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic