Skip to content

Commit ee18bf3

Browse files
author
Till Brehm
committed
Merge branch '6710-throw-error-when-invalid-client_id-is-passed-in-a-remote-api-function' into 'develop'
Resolve "Throw error when invalid client_id is passed in a remote API function" Closes #6710 See merge request ispconfig/ispconfig3!1907
2 parents 0dad50b + 6c5af22 commit ee18bf3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

interface/lib/classes/remoting_lib.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ function loadUserProfile($client_id_param = 0) {
127127
$_SESSION["s"]["user"]["typ"] = 'admin';
128128
} else {
129129
$user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = ?", $this->client_id);
130+
if(empty($user)) {
131+
throw new SoapFault('invalid_client_id', 'Invalid client_id '.$this->client_id);
132+
return false;
133+
}
130134
$this->sys_username = $user['username'];
131135
$this->sys_userid = $user['userid'];
132136
$this->sys_default_group = $user['default_group'];

0 commit comments

Comments
 (0)