projects
/
Pman.Base
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
52822d5
)
Fix #6800 - Login Dialog Remember Username / 2FA + other fixes
author
Alan Knowles
<alan@roojs.com>
Mon, 16 Aug 2021 07:45:59 +0000
(15:45 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 16 Aug 2021 07:45:59 +0000
(15:45 +0800)
Pman.php
patch
|
blob
|
history
Pman/Login.php
patch
|
blob
|
history
diff --git
a/Pman.php
b/Pman.php
index
9f9c783
..
b048ef5
100644
(file)
--- a/
Pman.php
+++ b/
Pman.php
@@
-560,7
+560,8
@@
class Pman extends HTML_FlexyFramework_Page
echo $this->jsencode(array(
'success'=> false,
echo $this->jsencode(array(
'success'=> false,
- 'data'=> array(),
+ 'data'=> array(),
+ 'code' => $type,
'errorMsg' => $str,
'message' => $str, // compate with exeption / loadexception.
'errors' => $errors ? $errors : true, // used by forms to flag errors.
'errorMsg' => $str,
'message' => $str, // compate with exeption / loadexception.
'errors' => $errors ? $errors : true, // used by forms to flag errors.
diff --git
a/Pman/Login.php
b/Pman/Login.php
index
df0aafd
..
6a20063
100644
(file)
--- a/
Pman/Login.php
+++ b/
Pman/Login.php
@@
-340,7
+340,7
@@
class Pman_Login extends Pman
}
if(!empty($u->oath_key) && empty($_REQUEST['oath_password'])){
}
if(!empty($u->oath_key) && empty($_REQUEST['oath_password'])){
- $this->jerror('LOGIN-
BAD
','Your account requires Two-Factor Authentication');
+ $this->jerror('LOGIN-
2FA
','Your account requires Two-Factor Authentication');
}
// check if config allows non-owner passwords.
}
// check if config allows non-owner passwords.
@@
-584,22
+584,22
@@
class Pman_Login extends Pman
$core_ip_access->sendXMPP();
$core_ip_access->sendXMPP();
- $this->jerr
('NEW-IP-ADDRESS'
, array('ip' => $ip));
+ $this->jerr
or('NEW-IP-ADDRESS', "New IP Address = needs approving"
, array('ip' => $ip));
return;
}
if(empty($core_ip_access->status)){
return;
}
if(empty($core_ip_access->status)){
- $this->jerr
('PENDING-IP-ADDRESS'
, array('ip' => $ip));
+ $this->jerr
or('PENDING-IP-ADDRESS', "IP is still pending approval"
, array('ip' => $ip));
}
if($core_ip_access->status == -1){
}
if($core_ip_access->status == -1){
- $this->jerr
('BLOCKED-IP-ADDRESS'
, array('ip' => $ip));
+ $this->jerr
or('BLOCKED-IP-ADDRESS', "Your IP is blocked"
, array('ip' => $ip));
return;
}
if($core_ip_access->status == -2 && strtotime($core_ip_access->expire_dt) < strtotime('NOW')){
return;
}
if($core_ip_access->status == -2 && strtotime($core_ip_access->expire_dt) < strtotime('NOW')){
- $this->jerr
('BLOCKED-IP-ADDRESS'
, array('ip' => $ip));
+ $this->jerr
pr('BLOCKED-IP-ADDRESS', "Your IP is blocked"
, array('ip' => $ip));
return;
}
return;
}