Bug 1422273 - NetworkManager fails to import openVPN configuration when file has a .bin suffix
Summary: NetworkManager fails to import openVPN configuration when file has a .bin suffix
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-14 23:08 UTC by Ed Greshko
Modified: 2017-12-12 10:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:20:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
openVPN config file from Ironsocket.com (9.60 KB, text/plain)
2017-02-14 23:08 UTC, Ed Greshko
no flags Details
Allows opening homologous configuration files with any extension or no extension. (3.68 KB, patch)
2017-02-16 04:59 UTC, poma
no flags Details | Diff

Description Ed Greshko 2017-02-14 23:08:16 UTC
Created attachment 1250389 [details]
openVPN config file from Ironsocket.com

Description of problem: When downloading an openvpn configuration from a VPN provider it may have a .bin extension such as the attached from Ironsocket.  When you select "Import VPN" from the GUI menu the Filter is "All Files".  When you select the *.bin file the file selection dialog disappears and the VPN configuration is not created.  Change the file name to US-New-York-City-S1.ovpn and it succeeds.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 poma 2017-02-16 04:59:39 UTC
Created attachment 1250776 [details]
Allows opening homologous configuration files with any extension or no extension.

Allows opening homologous configuration files with any extension or no extension.
Configuration files should be contextually conformant, not by file extension.

Comment 2 Thomas Haller 2017-02-16 09:34:05 UTC
(In reply to poma from comment #1)
> Created attachment 1250776 [details]
> Allows opening homologous configuration files with any extension or no
> extension.
> 
> Allows opening homologous configuration files with any extension or no
> extension.
> Configuration files should be contextually conformant, not by file extension.

we don't apply patches downstream first, they must always be merged upstream.
Just saying, we can take the patch from here too.

The name check may also be useful, because there is no way to select the VPN type in the GUI (there could be though). When you select import, all installed VPN plugins are tried until the first one is able to import the file. By restricting handling to certain file extensions, the chance that a wrong VPN plugin imports the file is reduced.
In other words: a VPN plugins may wrongly think the file is "contextually conformant".


> When you select the *.bin file the file selection dialog disappears and the
> VPN configuration is not created. 

this sounds like a bug. Of course, the GUI should show you an error dialog that importing failed.

Comment 3 Beniamino Galvani 2017-02-16 15:36:04 UTC
(In reply to Thomas Haller from comment #2)
> The name check may also be useful, because there is no way to select the VPN
> type in the GUI (there could be though). When you select import, all
> installed VPN plugins are tried until the first one is able to import the
> file. By restricting handling to certain file extensions, the chance that a
> wrong VPN plugin imports the file is reduced.
> In other words: a VPN plugins may wrongly think the file is "contextually
> conformant".

I agree, we need the check of the extension to determine the plugin that handles the file. Probably in most cases only one plugin supports a file but I fear that some very simple configuration file could be accepted by multiple plugins.

Probably the best way would be to first check the extension and if no plugins explicitly supports it fall back to checking the content. But that requires a bit more of work.

> > When you select the *.bin file the file selection dialog disappears and the
> > VPN configuration is not created. 
> 
> this sounds like a bug. Of course, the GUI should show you an error dialog
> that importing failed.

+1

Comment 4 Ed Greshko 2017-02-16 21:12:46 UTC
I don't know if this makes any difference, but I failed to mention that I'm using KDE.  I would, at a minimum, suggest.

1.  The open file dialog filter the files to include only those with known suffix for VPN configuration files.  Much like what many image handling programs do.  ( *.gif, *.jpeg ... etc in that case)

2.  If when parsing the config file a problem is encountered display an error message indicating the line within the config file causing the problem.

Comment 5 Thomas Haller 2017-02-16 23:02:33 UTC
KDE's plasma-nm is entirely separate.

Comment 6 Fedora End Of Life 2017-11-16 18:35:10 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2017-12-12 10:20:47 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.