2014-10-14 12:43:54 |
Bruno Nova |
bug |
|
|
added bug |
2014-10-20 12:27:12 |
Bruno Nova |
branch linked |
|
lp:~brunonova/software-properties/lp1381050 |
|
2014-10-20 12:33:25 |
Bruno Nova |
branch linked |
|
lp:~brunonova/software-properties/lp1381050 |
|
2014-10-30 16:24:19 |
Brian Murray |
software-properties (Ubuntu): status |
New |
Triaged |
|
2014-10-30 16:24:23 |
Brian Murray |
software-properties (Ubuntu): importance |
Undecided |
Medium |
|
2014-10-30 16:24:34 |
Brian Murray |
software-properties (Ubuntu): assignee |
|
Michael Vogt (mvo) |
|
2014-11-21 10:17:30 |
Launchpad Janitor |
branch linked |
|
lp:software-properties |
|
2014-11-21 17:18:05 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/vivid-proposed/software-properties |
|
2014-12-01 09:01:43 |
Launchpad Janitor |
software-properties (Ubuntu): status |
Triaged |
Fix Released |
|
2015-02-12 16:33:01 |
Bruno Nova |
branch linked |
|
lp:~brunonova/ubuntu/trusty/software-properties/lp1381050_lp1383289 |
|
2015-07-07 07:52:53 |
Michael Vogt |
nominated for series |
|
Ubuntu Trusty |
|
2015-07-07 07:52:53 |
Michael Vogt |
bug task added |
|
software-properties (Ubuntu Trusty) |
|
2015-07-07 07:55:05 |
Michael Vogt |
software-properties (Ubuntu Trusty): status |
New |
In Progress |
|
2015-07-07 07:55:07 |
Michael Vogt |
software-properties (Ubuntu Trusty): importance |
Undecided |
Medium |
|
2015-07-07 19:10:02 |
Bruno Nova |
description |
The "Import Key File..." button in the "Authentication" tab fails silently when the path of the selected key file includes special characters.
I'm using Ubuntu in Portuguese, so the "/home/$USER/Downloads" folder is named "/home/$USER/Transferências" here.
Adding a key from that folder fails, but adding a key from "/home/$USER" (no special characters) succeeds.
The problem is that, in softwareproperties/gtk/SoftwarePropertiesGtk.py in method SoftwarePropertiesGtk.add_key_clicked() at around line 952:
if res == Gtk.ResponseType.ACCEPT:
try:
if not self.backend.AddKey(chooser.get_filename()):
error(self.window_main,
_("Error importing selected file"),
_("The selected file may not be a GPG key file "
"or it might be corrupt."))
except dbus.DBusException as e:
if e._dbus_error_name == 'com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy':
logging.error("Authentication canceled, changes have not been saved")
"self.backend.AddKey(chooser.get_filename())" throws a "org.freedesktop.DBus.Python.UnicodeEncodeError" exception for paths with special characters.
This is probably a side effect of switching from Python 2 to 3 (and 'bytes' now being used in network communications where 'str' was previously used).
Another issue is that the error isn't reported to the user, and it should be.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: software-properties-gtk 0.92.37.1
ProcVersionSignature: Ubuntu 3.13.0-37.64-generic 3.13.11.7
Uname: Linux 3.13.0-37-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Oct 14 13:22:21 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-13 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install) |
[Impact]
Importing a key that is in a path that contains special characters (like "/home/$USER/Transferências") fails silently.
[Test Case]
1. Download a PGP key for a Debian repository (for example, the VideoLAN
team's key: download.videolan.org/pub/debian/videolan-apt.asc)
2. Move the key file to a folder that contains special characters, or rename
the file to contain them (example: VídeoLAN.asc).
3. Open "Software & Updates" from the Dash, then select the Authentication
tab.
4. Press the "Import Key File..." button and then choose the key file.
Admin authentication should then be requested, so authenticate yourself.
If the bug is fixed: the key should now appear in the list of keys.
If not: the key was not added.
[Regression Potential]
If the fix is not correct, I suppose it could potentially break the "import key" feature even more, so it wouldn't work even in "normal" paths.
[Original Report]
The "Import Key File..." button in the "Authentication" tab fails silently when the path of the selected key file includes special characters.
I'm using Ubuntu in Portuguese, so the "/home/$USER/Downloads" folder is named "/home/$USER/Transferências" here.
Adding a key from that folder fails, but adding a key from "/home/$USER" (no special characters) succeeds.
The problem is that, in softwareproperties/gtk/SoftwarePropertiesGtk.py in method SoftwarePropertiesGtk.add_key_clicked() at around line 952:
if res == Gtk.ResponseType.ACCEPT:
try:
if not self.backend.AddKey(chooser.get_filename()):
error(self.window_main,
_("Error importing selected file"),
_("The selected file may not be a GPG key file "
"or it might be corrupt."))
except dbus.DBusException as e:
if e._dbus_error_name == 'com.ubuntu.SoftwareProperties.PermissionDeniedByPolicy':
logging.error("Authentication canceled, changes have not been saved")
"self.backend.AddKey(chooser.get_filename())" throws a "org.freedesktop.DBus.Python.UnicodeEncodeError" exception for paths with special characters.
This is probably a side effect of switching from Python 2 to 3 (and 'bytes' now being used in network communications where 'str' was previously used).
Another issue is that the error isn't reported to the user, and it should be.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: software-properties-gtk 0.92.37.1
ProcVersionSignature: Ubuntu 3.13.0-37.64-generic 3.13.11.7
Uname: Linux 3.13.0-37-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Oct 14 13:22:21 2014
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-10-13 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install) |
|
2015-07-07 19:34:49 |
Brian Murray |
software-properties (Ubuntu Trusty): status |
In Progress |
Fix Committed |
|
2015-07-07 19:34:50 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2015-07-07 19:34:52 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2015-07-07 19:34:56 |
Brian Murray |
tags |
amd64 apport-bug trusty |
amd64 apport-bug trusty verification-needed |
|
2015-07-07 19:48:43 |
Launchpad Janitor |
branch linked |
|
lp:ubuntu/trusty-proposed/software-properties |
|
2015-07-08 19:44:09 |
Bruno Nova |
tags |
amd64 apport-bug trusty verification-needed |
amd64 apport-bug trusty verification-failed |
|
2015-07-13 18:26:12 |
Bruno Nova |
branch linked |
|
lp:~brunonova/software-properties/lp1381050_2 |
|
2015-09-01 21:28:52 |
Brian Murray |
software-properties (Ubuntu): status |
Fix Released |
In Progress |
|
2015-09-01 21:28:55 |
Brian Murray |
software-properties (Ubuntu): assignee |
Michael Vogt (mvo) |
Brian Murray (brian-murray) |
|
2015-09-15 14:07:55 |
Launchpad Janitor |
branch linked |
|
lp:~juliank/software-properties/debian |
|
2015-09-16 18:37:52 |
Mathew Hodson |
software-properties (Ubuntu Trusty): status |
Fix Committed |
In Progress |
|
2015-09-27 21:40:54 |
Mathew Hodson |
tags |
amd64 apport-bug trusty verification-failed |
amd64 apport-bug trusty |
|
2015-09-28 16:02:17 |
Launchpad Janitor |
software-properties (Ubuntu Trusty): status |
In Progress |
Fix Released |
|
2015-09-28 16:32:08 |
Brian Murray |
software-properties (Ubuntu Trusty): status |
Fix Released |
In Progress |
|
2016-04-27 07:09:21 |
sam |
branch unlinked |
lp:software-properties |
|
|
2016-12-08 15:55:38 |
Brian Murray |
software-properties (Ubuntu): assignee |
Brian Murray (brian-murray) |
|
|
2016-12-08 15:55:42 |
Brian Murray |
software-properties (Ubuntu): status |
In Progress |
Triaged |
|
2016-12-08 15:55:45 |
Brian Murray |
software-properties (Ubuntu Trusty): status |
In Progress |
Triaged |
|
2020-05-01 15:01:47 |
Jaroslavas Karmazinas |
software-properties (Ubuntu Trusty): status |
Triaged |
Confirmed |
|
2020-07-14 13:40:50 |
Ioana Lasc |
software-properties (Ubuntu Trusty): status |
Confirmed |
Triaged |
|
2022-11-01 17:16:10 |
akkount rekover |
branch unlinked |
lp:ubuntu/trusty-proposed/software-properties |
|
|