Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma applet for NetworkManager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma applet for NetworkManager
Commits
46c1dcbe
Commit
46c1dcbe
authored
May 14, 2018
by
Jan Grulich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unquote remote when importing OpenVPN connections
BUG:393657
parent
7f44a45f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
vpn/openvpn/openvpn.cpp
vpn/openvpn/openvpn.cpp
+7
-1
No files found.
vpn/openvpn/openvpn.cpp
View file @
46c1dcbe
...
...
@@ -23,6 +23,7 @@
#include "openvpn.h"
#include <QLatin1Char>
#include <QStringBuilder>
#include <KPluginFactory>
#include <KLocalizedString>
...
...
@@ -360,7 +361,12 @@ NMVariantMapMap OpenVpnUiPlugin::importConnectionSettings(const QString &fileNam
}
if
(
key_value
[
0
]
==
REMOTE_TAG
)
{
if
(
key_value
.
count
()
>=
2
&&
key_value
.
count
()
<=
4
)
{
dataMap
.
insert
(
QLatin1String
(
NM_OPENVPN_KEY_REMOTE
),
key_value
[
1
]);
QString
remote
=
key_value
[
1
];
if
(
remote
.
startsWith
(
QLatin1Char
(
'\''
))
||
remote
.
startsWith
(
QLatin1Char
(
'"'
)))
{
remote
.
remove
(
0
,
1
);
// Remove first quote
remote
.
remove
(
remote
.
size
()
-
1
,
1
);
// Remove last quote
}
dataMap
.
insert
(
QLatin1String
(
NM_OPENVPN_KEY_REMOTE
),
remote
);
have_remote
=
true
;
if
(
key_value
.
count
()
>=
3
&&
key_value
[
2
].
toLong
()
>
0
&&
key_value
[
2
].
toLong
()
<
65536
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment