Joomla 4.0-dev @ af9be59
php cli/joomla.php user:add
Create a user with p
as the password
Password doesnt meet configured Joomla User minimum password length and therefore should be rejected
User is created.
Labels |
Added:
?
|
Does anyone has in mind how that kind of rule validation should be implemented in the CLI context?
Surely it should read from the database the rules that the site admin has set ? The same rules that would be applied by the User Manager in admin.
Yes all of that is done in the form rule. The question was do we have some kind of 'please validate this field' option in the CLI right now as i dont think we should add just another place where repeat the code.
There is currently no validation of input in any command that I can see, certainly not any password validation happening - it just takes the provided password and hashes it - its lacking in that area and I have raised other issues about being able to set invalid vars by typo.
The validation would be needed in the ChangeUserPasswordCommand
as well as the add user command I guess
The question was do we have some kind of 'please validate this field' option in the CLI right now as i dont think we should add just another place where repeat the code.
Too bad Joomla lacks a general purpose data validation API and the closest thing that exists to one is a form rule which means everything has to be in an HTML form for it to be usable.
The question was do we have some kind of 'please validate this field' option in the CLI right now as i dont think we should add just another place where repeat the code.
Too bad Joomla lacks a general purpose data validation API and the closest thing that exists to one is a form rule which means everything has to be in an HTML form for it to be usable.
Ok so we are required to reimplement the rules or do you think there can be a general purpose data validation api based on the form rules maybe?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-07 18:39:28 |
Closed_By | ⇒ | PhilETaylor | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
hmm seems that there is no validation at all on that thing right? https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Console/AddUserCommand.php
Does anyone has in mind how that kind of rule validation should be implemented in the CLI context?