Bug 362640 - cryptic error message, when using long password to export secret key
Summary: cryptic error message, when using long password to export secret key
Status: RESOLVED WORKSFORME
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: 2.2.0
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-04 00:00 UTC by Stefan
Modified: 2022-11-19 05:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan 2016-05-04 00:00:10 UTC
Following the described steps the Kleopatra presents an error message which is not quite user friendly. In fact it should be possible to use a long password (as the one given in the repro steps). 

I understand that the issue is that the specified password is too long but there are several usability glitches here:
1. the input field to set a password to encrypt the keyfile does allow entering a long password and neither the displayed text hints to any limit there, nor is there a warning/error displayed when clicking OK after having entered the long password - at least there should be some mentioning on the restriction.
2. Given that very long passphrases are generally advertised in all docs related to GnuPG, IMO there should be no character limit for the password here at all.
3. The displayed error in the end is not quite user friendly. It's so cryptic and for someone not reading the whole text in detail it won't directly point to the actual issue (too long password). Such an error should be better presented to the user IMO. A simple error message would suffice:
"An error occurred while trying to export the secret key.
Error: password too long"

Any additional details are only of interest to developers and should not be presented to users.


Reproducible: Always

Steps to Reproduce:
1.on an existing X.509 key right click and select: "Export Secret Keys...."
2. select an output file and click ok
3. enter the key's passphrase -> press ok
4. enter the following password for the exported key: 0f9guf9dhgsadi90sdg0ßfd0hdgj0df -> press ok
5. enter the same password to confirm it -> press OK

Actual Results:  
The following error is displayed

Title: Secret Key Export Error --- Kleopatra

An error occurred while trying to export the secret key.

The output from E:\Program Files (x86)\GNU\GnuPG\gpgsm.exe was: gpgsm: gpg-protect-tool: AllowSetForegroundWindow(6380) failed: Access is denied. gpgsm: gpgsm: gpg-protect-tool: AllowSetForegroundWindow(3692) failed: Access is denied. gpgsm: gpgsm: gpg-protect-tool: password too long gpgsm: gpg-protect-tool: password too long gpgsm: gpg-protect-tool: password too long gpgsm: error running 'E:\Program Files (x86)\GNU\GnuPG\gpg-protect-tool.exe': exit status 2

Expected Results:  
Password file is generated without errors.
Comment 1 Stefan 2016-05-04 00:03:00 UTC
On a related note: Regardless of the error, the output file is created (it's empty however, in the error case). It would be better, if the file would either not be created, if there was an error, or that the file is removed and not being left behind, if exporting failed.
Comment 2 Justin Zobel 2022-10-20 23:54:33 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-04 05:07:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-11-19 05:15:05 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!