Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.9

Bug #19833 If gnupg folder is not accessible for write, "unknown error" exception is throw
Submitted: 2013-02-24 21:09 UTC
From: unxed Assigned: gauthierm
Status: Closed Package: Crypt_GPG (version 1.3.2)
PHP Version: Irrelevant OS: CentOS
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 - 14 = ?

 
 [2013-02-24 21:09 UTC] unxed (Ivan Sorokin)
Description: ------------ Crypt_GPG can not throw the correct error messege if gnupg folder can not be locked (in case of no write permissions for example). Test script: --------------- chmod -R 000 /home/test/gpg ... require_once 'Crypt/GPG.php'; $gpg = new Crypt_GPG(array('homedir' => '/home/test/gpg', 'debug' => true)); try { $signatures = $gpg->verify('some_string', 'some_string_signature'); } catch (Exception $e) { // "Unknown error validating signature details" // probably means that /home/test/gpg folder // has incorrect permissions set. // Error message should contain more information. echo $e->getMessage(); } Expected result: ---------------- Crypt_GPG should detect if gnupg can not write lock file to it's folder and throw the informative exception. Actual result: -------------- n/a

Comments

 [2013-02-28 03:49 UTC] gauthierm (Michael Gauthier)
homedir needs to be both executable and writable
 [2013-02-28 04:11 UTC] gauthierm (Michael Gauthier)
https://github.com/pear/Crypt_GPG/pull/3 Fix will be in next release.
 [2013-02-28 09:44 UTC] gauthierm (Michael Gauthier)
-Status: Open +Status: Closed -Assigned To: +Assigned To: gauthierm
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/