Skip to content

Commit 3d65b95

Browse files
author
Till Brehm
committed
Fixes #6710 Throw error when invalid client_id is passed in a remote API function
1 parent 0dad50b commit 3d65b95

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)