chdemko / joomla-external-login

The External Login project allows Joomla! to manage external Authentication Servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Username with single quote

alcad opened this issue · comments

commented

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

commented

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