X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flostpass.php;h=1751c2a7eacd555c1e4be88c3aaf1d8aa0d1870f;hb=49e16b0612d0ce60a7f2cb223cf36a087b532ec1;hp=57e6d696537c24b3e5440d751b5e1fa6c4e6625a;hpb=88bbc5e0bc89f84aaf5160546dfa782f8f1d7e5e;p=friendica.git diff --git a/mod/lostpass.php b/mod/lostpass.php old mode 100755 new mode 100644 index 57e6d69653..1751c2a7ea --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -1,5 +1,6 @@ $a->get_baseurl() . '/lostpass?verify=' . $new_password )); - $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']), + $res = mail($email, email_header_encode(sprintf( t('Password reset requested at %s'),$a->config['sitename']),'UTF-8'), $email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); @@ -73,7 +74,7 @@ function lostpass_content(&$a) { $new_password = autoname(6) . mt_rand(100,9999); $new_password_encoded = hash('whirlpool',$new_password); - $r = q("UPDATE `user` SET `password` = '%s', `pwdreset` = '' WHERE `uid` = %d LIMIT 1", + $r = q("UPDATE `user` SET `password` = '%s', `pwdreset` = '' WHERE `uid` = %d", dbesc($new_password_encoded), intval($uid) ); @@ -103,8 +104,10 @@ function lostpass_content(&$a) { '$new_password' => $new_password, '$uid' => $newuid )); - $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + $subject = sprintf( t('Your password has been changed at %s'), $a->config['sitename']); + + $res = mail($email, email_header_encode( $subject, 'UTF-8'), $email_tpl, + 'From: ' . 'Administrator' . '@' . $_SERVER['SERVER_NAME'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' );