Username with single quote
alcad opened this issue · comments
Hi,
I found a trouble when try to acces with username with single quote in it.
I try to access with external cas that hat a lot of usernames with single quote but system cannot use it because an error in cas login.
Can you check this cases please?
Regards
The error is when Joomla register user.
Joomla does not consent some special chars in username (accordingly this regex):
"libraries/joomla/table/user.phpuser.php:190" - Joomla 3.7.0
'#[<>"\'%;()&\\\\]|\\.\\./#'
Temporary solved replacing single quote in cas response data in:
plugins/system/caslogin/caslogin.php
// Compute username
$response->username = str_replace("'", '', $this->xpath->evaluate($params->get('username_xpath'), $this->success));
// Compute email
$response->email = str_replace("'", '', $this->xpath->evaluate($params->get('email_xpath'), $this->success));
Solve in current version