After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793910 - Certificate Files with space chars won't work via GUI
Certificate Files with space chars won't work via GUI
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: openvpn
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 793366 (view as bug list)
Depends on:
Blocks: nm-review
 
 
Reported: 2018-02-28 10:34 UTC by Stif
Modified: 2018-03-07 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] libnma: unescape certificate paths in URIs (1.66 KB, patch)
2018-03-04 14:12 UTC, Beniamino Galvani
none Details | Review
[PATCH v2] libnma: unescape certificate paths in URIs (2.15 KB, patch)
2018-03-05 17:41 UTC, Beniamino Galvani
none Details | Review

Description Stif 2018-02-28 10:34:53 UTC
When there are space chars in the filename of a certificate, the "add file dialog" url-encodes them and the NetworkManager cannot find it afterwards: 

nm-openvpn[1646]: Options error: --ca fails with '/home/stif/<--snip-->/Haas%20Hackenberg/VPN/Haas-CA.crt': No such file or directory (errno=2)

If i change the '%20' to ' ' in the corresponding /etc/NetworkManager/system-connections File everything is ok.
Comment 1 Beniamino Galvani 2018-03-04 14:12:49 UTC
Created attachment 369268 [details] [review]
[PATCH] libnma: unescape certificate paths in URIs
Comment 2 Thomas Haller 2018-03-05 15:09:56 UTC
(In reply to Beniamino Galvani from comment #1)
> Created attachment 369268 [details] [review] [review]
> [PATCH] libnma: unescape certificate paths in URIs

doesn't the libnm-gtk version below have the same issue?

Maybe merge these two functions, and move the "#if LIBNM_BUILD" inside the function -- moving the differenciator closer to where the code differs.
Comment 3 Beniamino Galvani 2018-03-05 17:41:54 UTC
Created attachment 369360 [details] [review]
[PATCH v2] libnma: unescape certificate paths in URIs

(In reply to Thomas Haller from comment #2)
> (In reply to Beniamino Galvani from comment #1)
> > Created attachment 369268 [details] [review] [review] [review]
> > [PATCH] libnma: unescape certificate paths in URIs
> 
> doesn't the libnm-gtk version below have the same issue?

Right, fixed.

> Maybe merge these two functions, and move the "#if LIBNM_BUILD" inside the
> function -- moving the differenciator closer to where the code differs.

The LIBNM_BUILD version some macros for prefixes that are only available in libnm... we could avoid them and use the string literal directly, but it's unclear if it would be an improvement.
Comment 4 Thomas Haller 2018-03-05 19:08:22 UTC
(In reply to Beniamino Galvani from comment #3)
> Created attachment 369360 [details] [review] [review]
> [PATCH v2] libnma: unescape certificate paths in URIs
> 
> (In reply to Thomas Haller from comment #2)
> > (In reply to Beniamino Galvani from comment #1)
> > > Created attachment 369268 [details] [review] [review] [review] [review]
> > > [PATCH] libnma: unescape certificate paths in URIs
> > 
> > doesn't the libnm-gtk version below have the same issue?
> 
> Right, fixed.

lgtm
Comment 6 Beniamino Galvani 2018-03-07 16:14:44 UTC
*** Bug 793366 has been marked as a duplicate of this bug. ***