Skip to content

Commit

Permalink
changes requested by reviewers
Browse files Browse the repository at this point in the history
  • Loading branch information
GeraintEdwards committed May 9, 2018
1 parent 60f9ea9 commit 9cf6f29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion language/en-GB/en-GB.lib_joomla.ini
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ JLIB_DATABASE_ERROR_USERGROUP_TITLE_EXISTS="User group title already exists. Tit
JLIB_DATABASE_ERROR_USERLEVEL_NAME_EXISTS="Level with the name "%s" already exists."
JLIB_DATABASE_ERROR_USERNAME_CANNOT_CHANGE="Can't use this username."
JLIB_DATABASE_ERROR_USERNAME_INUSE="Username in use."
JLIB_DATABASE_ERROR_USERNAME_NAME_MUST_NOT_CONTAIN_LINKS="Username and Name fields must not contain links"
JLIB_DATABASE_ERROR_USERNAME_NAME_MUST_NOT_CONTAIN_LINKS="Username and Name must not contain links."
JLIB_DATABASE_ERROR_VALID_AZ09="Please enter a valid username. No space at beginning or end, at least %d characters and must <strong>not</strong> have the following characters: < > \ &quot; ' &#37; ; ( ) &."
JLIB_DATABASE_ERROR_VALID_MAIL="Please enter a valid email address."
JLIB_DATABASE_ERROR_VIEWLEVEL="Viewlevel must have a title."
Expand Down
6 changes: 3 additions & 3 deletions libraries/src/Table/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,16 @@ public function check()

return false;
}

// Block using registration emails to send spam/malware/phishing emails with embedded links
// The regex blocks :// (as in http:// https:// ftp:// etc.) www. and ftp. in the username/name
if (preg_match('#(:\/\/|\bwww.|\bftp.)#i', $this->username) || preg_match('#(:\/\/|\bwww.|\bftp.)#i', $this->name))
{
$this->setError(\JText::_('JLIB_DATABASE_ERROR_USERNAME_NAME_MUST_NOT_CONTAIN_LINKS'));

return false;
return false;
}

if (($filterInput->clean($this->email, 'TRIM') == '') || !\JMailHelper::isEmailAddress($this->email))
{
$this->setError(\JText::_('JLIB_DATABASE_ERROR_VALID_MAIL'));
Expand Down

0 comments on commit 9cf6f29

Please sign in to comment.