@@ -93,7 +93,7 @@ |
||
| 93 | 93 | preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]*?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); |
| 94 | 94 | |
| 95 | 95 | foreach ($matches as $m) { |
| 96 | - $data[strval($m[1])] = strval($m[3] ?: ( $m[4] ?? '' )); |
|
| 96 | + $data[strval($m[1])] = strval($m[3] ?: ($m[4] ?? '')); |
|
| 97 | 97 | unset($needed_parts[$m[1]]); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -36,8 +36,8 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function process(ArrayAccess $credentials): void |
| 38 | 38 | { |
| 39 | - $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 40 | - $pass = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : '' ; |
|
| 39 | + $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : ''; |
|
| 40 | + $pass = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : ''; |
|
| 41 | 41 | |
| 42 | 42 | if (!empty($name) && !empty($pass)) { |
| 43 | 43 | /** @scrutinizer ignore-call */ |
@@ -58,10 +58,10 @@ |
||
| 58 | 58 | /** @scrutinizer ignore-call */ |
| 59 | 59 | $this->loggedUser = $this->authenticator->getDataOnly($this->nameFromSess()); |
| 60 | 60 | } else { |
| 61 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 62 | - $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name ; |
|
| 63 | - $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : '' ; |
|
| 64 | - $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass ; |
|
| 61 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
| 62 | + $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name; |
|
| 63 | + $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : ''; |
|
| 64 | + $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass; |
|
| 65 | 65 | if (!empty($name) && !empty($pass)) { |
| 66 | 66 | /** @scrutinizer ignore-call */ |
| 67 | 67 | $this->loggedUser = $this->authenticator->authenticate($name, ['password' => $pass]); |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | |
| 92 | 92 | public function process(\ArrayAccess $credentials): void |
| 93 | 93 | { |
| 94 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 94 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
| 95 | 95 | $ip = strval($this->server->offsetGet(static::SERVER_REMOTE)); |
| 96 | 96 | try { |
| 97 | 97 | if ($this->libBan->has( |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function process(\ArrayAccess $credentials): void |
| 45 | 45 | { |
| 46 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 47 | - $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name ; |
|
| 48 | - $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0 ; |
|
| 46 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
| 47 | + $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name; |
|
| 48 | + $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0; |
|
| 49 | 49 | |
| 50 | 50 | $wantedUser = $this->certAuthenticator->getDataOnly(strval($name)); |
| 51 | 51 | $wantedCert = $this->certAuthenticator->getCertData(strval($name)); |
@@ -52,9 +52,9 @@ |
||
| 52 | 52 | |
| 53 | 53 | public function process(\ArrayAccess $credentials): void |
| 54 | 54 | { |
| 55 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 56 | - $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2) ): $name ; |
|
| 57 | - $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0 ; |
|
| 55 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
| 56 | + $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name; |
|
| 57 | + $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0; |
|
| 58 | 58 | |
| 59 | 59 | $wantedUser = $this->certAuthenticator->getDataOnly(strval($name)); |
| 60 | 60 | $wantedCert = $this->certAuthenticator->getCertData(strval($name)); |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | |
| 42 | 42 | public function process(\ArrayAccess $credentials): void |
| 43 | 43 | { |
| 44 | - $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : '' ; |
|
| 45 | - $digest = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : '' ; |
|
| 44 | + $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : ''; |
|
| 45 | + $digest = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : ''; |
|
| 46 | 46 | $wantedUser = $this->certAuthenticator->getDataOnly(strval($name)); |
| 47 | 47 | $wantedCert = $this->certAuthenticator->getCertData(strval($name)); |
| 48 | 48 | if ($wantedUser && $wantedCert && $digest) { |
@@ -16,10 +16,10 @@ |
||
| 16 | 16 | { |
| 17 | 17 | /** @var acc_interfaces\IUser|acc_interfaces\IUserCert|null */ |
| 18 | 18 | protected static $authenticator = null; |
| 19 | - protected static ?acc_interfaces\IAuth $auth = null; |
|
| 20 | - protected static ?acc_interfaces\IProcessGroups $groups = null; |
|
| 21 | - protected static ?acc_interfaces\IProcessClasses $classes = null; |
|
| 22 | - protected static ?acc_interfaces\IProcessAccounts $accounts = null; |
|
| 19 | + protected static ? acc_interfaces\IAuth $auth = null; |
|
| 20 | + protected static ? acc_interfaces\IProcessGroups $groups = null; |
|
| 21 | + protected static ? acc_interfaces\IProcessClasses $classes = null; |
|
| 22 | + protected static ? acc_interfaces\IProcessAccounts $accounts = null; |
|
| 23 | 23 | |
| 24 | 24 | protected static ?AuthTree $authTree = null; |
| 25 | 25 | |