json call for list addresses now need the password as GET/POST parameter
This commit is contained in:
parent
0858fcbbf9
commit
f8578d62b5
|
@ -78,7 +78,7 @@ class OpenTrashmailBackend{
|
||||||
header("Content-Type: application/json; charset=UTF8");
|
header("Content-Type: application/json; charset=UTF8");
|
||||||
if($this->url[1]=='listaccounts')
|
if($this->url[1]=='listaccounts')
|
||||||
{
|
{
|
||||||
if($this->settings['SHOW_ACCOUNT_LIST'])
|
if($this->settings['SHOW_ACCOUNT_LIST'] && (($this->settings['ADMIN_PASSWORD'] != "" && $_REQUEST['password']==$this->settings['ADMIN_PASSWORD'])|| !$this->settings['ADMIN_PASSWORD']))
|
||||||
return json_encode(listEmailAdresses());
|
return json_encode(listEmailAdresses());
|
||||||
else exit(json_encode(['error'=>'403 Forbidden']));
|
else exit(json_encode(['error'=>'403 Forbidden']));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue