[ postfixadmin-Bugs-3489740 ] dovecot SHA256 problem
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2012-10-16 10:23:10
|
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: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 |