35 switch ($passwordTransmissionStrategy) {
37 $loginData[
'uident_text'] = $loginData[
'uident'];
40 $loginData[
'uident_text'] =
'';
41 $loginData[
'uident_challenged'] = $loginData[
'uident'];
42 $loginData[
'uident_superchallenged'] =
'';
44 case 'superchallenged':
45 $loginData[
'uident_text'] =
'';
46 $loginData[
'uident_challenged'] =
'';
47 $loginData[
'uident_superchallenged'] = $loginData[
'uident'];
52 if (!empty($loginData[
'uident_text'])) {
53 $loginData[
'uident_challenged'] = (string) md5(($loginData[
'uname'] .
':' . $loginData[
'uident_text'] .
':' . $loginData[
'chalvalue']));
54 $loginData[
'uident_superchallenged'] = (string) md5(($loginData[
'uname'] .
':' . md5($loginData[
'uident_text']) .
':' . $loginData[
'chalvalue']));
68 if ($this->login[
'status'] ==
'login') {
69 if ($this->login[
'uident']) {
71 if (!is_array($user)) {
73 $this->
writelog(255, 3, 3, 2,
'Login-attempt from %s (%s), username \'%s\' not found!!', array($this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']));
75 \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf(
'Login-attempt from %s (%s), username \'%s\' not found!', $this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']),
'Core', \
TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
77 if ($this->writeDevLog) {
83 $this->
writelog(255, 3, 3, 2,
'Login-attempt from %s (%s) for username \'%s\' with an empty password!', array($this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']));
84 \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf(
'Login-attempt from %s (%s), for username \'%s\' with an empty password!', $this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']),
'Core', \
TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
108 if ((
string)$this->login[
'uident'] !==
'' && (
string)$this->login[
'uname'] !==
'') {
113 if ($this->writeAttemptLog) {
114 $this->
writelog(255, 3, 3, 1,
'Login-attempt from %s (%s), username \'%s\', password not accepted!', array($this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']));
115 \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf(
'Login-attempt from %s (%s), username \'%s\', password not accepted!', $this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $this->login[
'uname']),
'Core', \
TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
117 if ($this->writeDevLog) {
122 if ($OK && $user[
'lockToDomain'] && $user[
'lockToDomain'] != $this->authInfo[
'HTTP_HOST']) {
124 if ($this->writeAttemptLog) {
125 $this->
writelog(255, 3, 3, 1,
'Login-attempt from %s (%s), username \'%s\', locked domain \'%s\' did not match \'%s\'!', array($this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $user[$this->db_user[
'username_column']], $user[
'lockToDomain'], $this->authInfo[
'HTTP_HOST']));
126 \TYPO3\CMS\Core\Utility\GeneralUtility::sysLog(sprintf(
'Login-attempt from %s (%s), username \'%s\', locked domain \'%s\' did not match \'%s\'!', $this->authInfo[
'REMOTE_ADDR'], $this->authInfo[
'REMOTE_HOST'], $user[$this->db_user[
'username_column']], $user[
'lockToDomain'], $this->authInfo[
'HTTP_HOST']),
'Core', \
TYPO3\CMS\Core\Utility\GeneralUtility::SYSLOG_SEVERITY_WARNING);
144 $groupDataArr = array();
145 if ($this->mode ==
'getGroupsFE') {
147 if (is_array($user) && $user[$this->db_user[
'usergroup_column']]) {
148 $groupList = $user[$this->db_user[
'usergroup_column']];
153 if (is_array($TYPO3_CONF_VARS[
'FE'][
'IPmaskMountGroups'])) {
154 foreach ($TYPO3_CONF_VARS[
'FE'][
'IPmaskMountGroups'] as $IPel) {
155 if ($this->authInfo[
'REMOTE_ADDR'] && $IPel[0] && \
TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP($this->authInfo[
'REMOTE_ADDR'], $IPel[0])) {
156 $groups[] = (int)$IPel[1];
160 $groups = array_unique($groups);
161 if (count($groups)) {
162 $list = implode(
',', $groups);
163 if ($this->writeDevLog) {
168 .
'lockToDomain=\'\'' 169 .
' OR lockToDomain IS NULL' 170 .
' OR lockToDomain=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->authInfo[
'HTTP_HOST'], $this->db_groups[
'table'])
172 if (!$this->authInfo[
'showHiddenRecords']) {
173 $hiddenP =
'AND hidden=0 ';
175 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'*', $this->db_groups[
'table'],
'deleted=0 ' . $hiddenP .
' AND uid IN (' . $list .
')' . $lockToDomain_SQL);
176 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
177 $groupDataArr[$row[
'uid']] = $row;
180 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
183 if ($this->writeDevLog) {
187 } elseif ($this->mode ==
'getGroupsBE') {
190 return $groupDataArr;
209 .
'lockToDomain=\'\'' 210 .
' OR lockToDomain IS NULL' 211 .
' OR lockToDomain=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->authInfo[
'HTTP_HOST'],
'fe_groups')
213 if (!$this->authInfo[
'showHiddenRecords']) {
214 $hiddenP =
'AND hidden=0 ';
216 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'uid,subgroup',
'fe_groups',
'deleted=0 ' . $hiddenP .
' AND uid IN (' . $grList .
')' . $lockToDomain_SQL);
218 $groupRows = array();
220 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
221 if (!in_array($row[
'uid'], $groups)) {
222 $groups[] = $row[
'uid'];
224 $groupRows[$row[
'uid']] = $row;
229 foreach ($include_staticArr as
$uid) {
231 $row = $groupRows[
$uid];
233 if (is_array($row) && !\
TYPO3\CMS\Core\Utility\GeneralUtility::inList($idList, $uid)) {
235 if (trim($row[
'subgroup'])) {
237 $theList = implode(
',', \
TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(
',', $row[
'subgroup']));
239 $this->
getSubGroups($theList, $idList .
',' . $uid, $groups);
$TYPO3_CONF_VARS['SYS']['contentTable']
writelog($type, $action, $error, $details_nr, $details, $data, $tablename='', $recuid='', $recpid='')
static devLog($msg, $extKey, $severity=0, $dataVar=FALSE)
static intExplode($delimiter, $string, $removeEmptyValues=FALSE, $limit=0)
processLoginData(array &$loginData, $passwordTransmissionStrategy)
getSubGroups($grList, $idList='', &$groups)
fetchUserRecord($username, $extraWhere='', $dbUserSetup='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getGroups($user, $knownGroups)
compareUident(array $user, array $loginData, $passwordCompareStrategy='')