-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bug: Cannot assign bool to property CodeIgniter\Shield\Result::$reason #851
Comments
That was happend to me in normal shiled when I try to register a new account while Iam on arabic language. and also happened to me when I try ti check the validation of password strength when trying to change the user password using the following code in Controller: namespace App\Controllers
use CodeIgniter\Shield\Authentication\Passwords;
use Config\Services;
//....
//....
//....
class Account extends BaseController
{
public function changepwdAction()
{
/////.........
$newPassword = $this->request->getPost('newPassword');
$data_to_be_validated = [
'newPassword' => $newPassword,
];
$rules = [
'newPassword' => 'required|' . Passwords::getMaxLengthRule() . '|strong_password[]',
];
$this->validation->setRules($rules);
if (! $this->validation->run($data_to_be_validated) ){
//error password
dd( $errors = $this->validation->getErrors());
}
}
}
|
@mshannaq I was able to reproduce with |
The translation string does not seem to be correct. At least, PHP's shield/src/Language/ar/Auth.php Line 68 in 8c4276b
|
I fiexed it in arabic language by
by removng also in
It is not correct as number is variable , I will change the translating text to use number not the translate of number |
PHP Version
8.2
CodeIgniter4 Version
4.4.1
Shield Version
dev-develop
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
mysql
Did you customize Shield?
No
What happened?
IF using another language rather that english for example 'ar' language and try to register account with not secuered password for example
testpassword
I got an error which is
instead if showing the error
The password testpassword has been exposed due to a data breach and has been seen 1,109 times in databases of compromised passwords.
if the ci language is english.trace:
VENDORPATH/codeigniter4/shield/src/Result.php at line 36
Backtrack:
Steps to Reproduce
change ci langaue to any other language rather than english - for example arabic
try to register a new user with easy password eg
testpassword
Expected Output
the correctt is return ti register form with error
The password testpassword has been exposed due to a data breach and has been seen 1,109 times in databases of compromised passwords.
Anything else?
No response
The text was updated successfully, but these errors were encountered: