make sure auth is regenerated each time we call this API (#2347)

This commit is contained in:
Pliable Pixels 2018-12-16 11:02:07 -05:00 committed by Isaac Connor
parent c1f46a9cb0
commit 622c17f628
1 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,8 @@ class HostController extends AppController {
$zmAuthRelay = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_RELAY')))['Config']['Value'];
if ( $zmAuthRelay == 'hashed' ) {
$zmAuthHashIps = $this->Config->find('first',array('conditions' => array('Config.' . $this->Config->primaryKey => 'ZM_AUTH_HASH_IPS')))['Config']['Value'];
$credentials = 'auth='.generateAuthHash($zmAuthHashIps);
// make sure auth is regenerated each time we call this API
$credentials = 'auth='.generateAuthHash($zmAuthHashIps,true);
} else {
// user will need to append the store password here
$credentials = 'user='.$this->Session->read('user.Username').'&pass=';