[ postfixadmin-Bugs-3489740 ] dovecot SHA256 problem
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2012-10-16 10:45:26
|
Bugs item #3489740, was opened at 2012-02-20 12:29 Message generated for change (Comment added) made by nervoso You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3489740&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: v2.3.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: AJ (koga73) Assigned to: Nobody/Anonymous (nobody) Summary: dovecot SHA256 problem Initial Comment: I tried using dovecot:SHA256 to hash my passwords. I finally got it working after some code modifications. For one dovecotpw is now doveadm pw. I generated my hash using doveadm pw -s SHA256 and updated the database. PostfixAdmin would not log in and threw no errors. After echoing the hash that PFA was generating I realized two things: The PFA generated hash trims the encryption scheme (whats the purpose?). This creates problems for dovecot when using a SHA hash. The PFA generated hash has a new line character "\n" at the end. To fix the hashing issues I made the following change: MODIFIED THIS LINE: $password = trim(str_replace('{' . $method . '}', '', $password)); TO THIS: $password = rtrim($password); Now I am able to keep the encryption scheme in the database and the modified code trims the newline character off the end of the hash. ---------------------------------------------------------------------- Comment By: Luca Gibelli (nervoso) Date: 2012-10-16 03:45 Message: # dovecot --version 1.2.9 ---------------------------------------------------------------------- Comment By: GingerDog (gingerdog) Date: 2012-10-16 03:29 Message: Hi, 1. config.inc.php does contain comments to suggest using either dovecotpw or doveadm pw - depending on the version of dovecot - see around the setting for : // If you use the dovecot encryption method: where is the dovecotpw binary located? // for dovecot 1.x // $CONF['dovecotpw'] = "/usr/sbin/dovecotpw"; // for dovecot 2.x (dovecot 2.0.0 - 2.0.7 is not supported!) $CONF['dovecotpw'] = "/usr/sbin/doveadm pw"; Presumably the str_replace stuff is/was the behaviour necessary from Dovecot 1.x perhaps? (I know I've had dovecot working with PFA in the past). ---------------------------------------------------------------------- Comment By: Luca Gibelli (nervoso) Date: 2012-10-16 03:23 Message: +1 for this I faced the same problem and solved it the same way. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3489740&group_id=191583 |