@@ -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->authenticator->getCertData(strval($name)); |
51 | 51 | if ($wantedUser && !empty($stamp) && $this->checkStamp($stamp)) { |
@@ -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 |
@@ -53,9 +53,9 @@ |
||
53 | 53 | |
54 | 54 | public function process(\ArrayAccess $credentials): void |
55 | 55 | { |
56 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
57 | - $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2) ): $name ; |
|
58 | - $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0 ; |
|
56 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
57 | + $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name; |
|
58 | + $stamp = $credentials->offsetExists(static::INPUT_STAMP) ? intval(strval($credentials->offsetGet(static::INPUT_STAMP))) : 0; |
|
59 | 59 | |
60 | 60 | $wantedUser = $this->authenticator->getCertData(strval($name)); |
61 | 61 | if ($wantedUser && !empty($stamp) && $this->checkStamp($stamp)) { |
@@ -42,8 +42,8 @@ |
||
42 | 42 | |
43 | 43 | public function process(\ArrayAccess $credentials): void |
44 | 44 | { |
45 | - $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : '' ; |
|
46 | - $digest = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : '' ; |
|
45 | + $name = $this->server->offsetExists(static::INPUT_NAME) ? strval($this->server->offsetGet(static::INPUT_NAME)) : ''; |
|
46 | + $digest = $this->server->offsetExists(static::INPUT_PASS) ? strval($this->server->offsetGet(static::INPUT_PASS)) : ''; |
|
47 | 47 | $wantedUser = $this->authenticator->getCertData(strval($name)); |
48 | 48 | if ($wantedUser && $digest) { |
49 | 49 | // now we have public key and salt from our storage, so it's time to check it |
@@ -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( |