projects
/
GitHub
/
Stricted
/
speedport-hybrid-php-api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a2bacc4
)
fix login logic again
author
Stricted
<info@stricted.net>
Sat, 17 Jun 2017 13:48:32 +0000
(15:48 +0200)
committer
Stricted
<info@stricted.net>
Sat, 17 Jun 2017 13:48:32 +0000
(15:48 +0200)
lib/trait/Login.class.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/trait/Login.class.php
b/lib/trait/Login.class.php
index 737106c5042e6318f80b20aff9f255e9bf752336..bfbb276635c491ecc73d4a9066135c334e79ac1e 100644
(file)
--- a/
lib/trait/Login.class.php
+++ b/
lib/trait/Login.class.php
@@
-49,12
+49,11
@@
trait Login {
$fields = array('csrf_token' => 'nulltoken', "challengev" => $this->challenge, 'showpw' => 0, 'password' => $this->hash);
$data = $this->sendRequest($path, $fields);
$json = $this->getValues($data['body']);
$fields = array('csrf_token' => 'nulltoken', "challengev" => $this->challenge, 'showpw' => 0, 'password' => $this->hash);
$data = $this->sendRequest($path, $fields);
$json = $this->getValues($data['body']);
- if (
!in_array("challenge
", $json)) {
+ if (
array_key_exists("challengev
", $json)) {
$fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash);
$data = $this->sendRequest($path, $fields);
$json = $this->getValues($data['body']);
}
$fields = array('csrf_token' => 'nulltoken', 'showpw' => 0, 'password' => $this->hash);
$data = $this->sendRequest($path, $fields);
$json = $this->getValues($data['body']);
}
-
if (isset($json['login']) && $json['login'] == 'success') {
$this->cookie = $this->getCookie($data);
if (isset($json['login']) && $json['login'] == 'success') {
$this->cookie = $this->getCookie($data);