PHP Fatal error: forgot-form

hgs

Yes, the error is detected and fixed. Thanks for the message.
Please download the fix from the addon page
https://addon.websitebaker.org/pages/en/home.php
(Password Fix WB 2.10.0 - 2.12.0) (last changes 17-Oct-18 18:37 GMT)
and test it and give us your feedback.
Thank you
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

dbs

Confirmed, if WB is installed in a subdirectory.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

hgs

Did they install the fixes from here?
https://addon.websitebaker.org/pages/en/home.php

(Password Fix WB 2.10.0 - 2.12.0)
(Bug-Fixes for WB 2.12.0 stable, We collect reported problems and publish fixes.)
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Vasiliy

WB-Version 2.12.0
The solution (mistake 2) is to change code in line 73-77 in the file forgot_form.php

Quoterequire_once(WB_PATH.'/framework/PasswordHash.php');
$pwh = new PasswordHash(0, true);
$old_pass = $results_array['password'];
// Generate a random password then update the database with it
$new_pass = $pwh->NewPassword();
and line 79
Quote. '`password`=\''.$database->escapeString($pwh->HashPassword($new_pass, true)).'\', '

Code I am copy from file signup2.php
Quote$old_pass = $results_array['password'];
$new_pass = '';
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
$i = 0;
while ($i <= 7)
{
   $num = rand() % 33;
    $tmp = substr($salt, $num, 1);
    $new_pass = $new_pass . $tmp;
    $i++;
}

// MD5 supplied password
$md5_password = md5($new_pass);
Quote. '`password`=\''.$database->escapeString($md5_password).'\', '
Now forget the password form work.
Without these changes, the form does not work.

Vasiliy

Hello!

I checked my site and found two more errors:
When prompted to fogot the password.

1. The first mistake. In the forgot_form.htt file
Line number 13
Quote<form action="{WB_URL}/account/forgot.php" method="post" class="account" autocomplete="off">
Variable value {WB_URL}
not defined in the file forgot_form.php .
Therefore, the wrong path to the form verification file forgot.php is called in the form.
I have Wb located in the subdectoria, and here the root path is called.

The solution is to add a line to the file forgot_form.php
Quote$template->set_var('WB_URL', WB_URL);
Now the correct path to the form validation file forgot.php is called.

2. The second mistake. It immediately appeared in the file forgot_form.php
QuotePHP Fatal error:  require_once(): Failed opening required '/public_html/wb-test/framework/PasswordHash.php'
This is the code that causes the error.
Quoterequire_once(WB_PATH.'/framework/PasswordHash.php');
                $pwh = new PasswordHash(0, true);