- Password Plugin: Fix %d inserts username instead of domain (#1486088)

release-0.6
alecpl 15 years ago
parent d9b9369c57
commit 3dd90d323d

@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail CHANGELOG RoundCube Webmail
=========================== ===========================
- Password Plugin: Fix %d inserts username instead of domain (#1486088)
- Fix rcube_mdb2::affected_rows() (#1486082) - Fix rcube_mdb2::affected_rows() (#1486082)
RELEASE 0.3-stable RELEASE 0.3-stable

@ -5,7 +5,7 @@
* *
* Driver for passwords stored in SQL database * Driver for passwords stored in SQL database
* *
* @version 1.2 * @version 1.3
* @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl> * @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl>
* *
*/ */
@ -81,7 +81,7 @@ function password_save($curpass, $passwd)
$user_info = explode('@', $_SESSION['username']); $user_info = explode('@', $_SESSION['username']);
if (count($user_info) >= 2) { if (count($user_info) >= 2) {
$sql = str_replace('%l', $db->quote($user_info[0], 'text'), $sql); $sql = str_replace('%l', $db->quote($user_info[0], 'text'), $sql);
$sql = str_replace('%d', $db->quote($user_info[0], 'text'), $sql); $sql = str_replace('%d', $db->quote($user_info[1], 'text'), $sql);
} }
$sql = str_replace('%u', $db->quote($_SESSION['username'],'text'), $sql); $sql = str_replace('%u', $db->quote($_SESSION['username'],'text'), $sql);

Loading…
Cancel
Save