Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Username length check inconsistent across creation of user and updating of user. #188

Open
gauranshkumar opened this issue Mar 16, 2025 · 0 comments
Assignees
Labels

Comments

@gauranshkumar
Copy link
Collaborator

$this->form_validation->set_rules('user_username', $table_config['fields']['user_username']['field_title'], 'trim|required|min_length[2]|max_length[12]');

$this->form_validation->set_rules('user_name', 'Name', 'trim|required');

Fix:

$this->form_validation->set_rules('user_name', 'Name', 'trim|required'); 

// should be replaced with this here relis_app/controllers/User.php#L353
$this->form_validation->set_rules('user_name', 'Name', 'trim|required|min_length[2]|max_length[20]');

// also to keep it consistent while updating the user the max_length should be changed to 20 here /relis_app/controllers/Element.php#L831
$this->form_validation->set_rules('user_username', $table_config['fields']['user_username']['field_title'], 'trim|required|min_length[2]|max_length[20]');
@gauranshkumar gauranshkumar self-assigned this Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant