Skip to content

Commit df99cfd

Browse files
author
Till Brehm
committed
Merge branch '6244-3-2-7-remote-api-login-fails-if-restricted-by-remote_ips' into 'develop'
Resolve "3.2.7: remote api login fails if restricted by remote_ips" Closes #6244 See merge request ispconfig/ispconfig3!1534
2 parents a0c3cda + ae95562 commit df99cfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ public function login($username, $password, $client_login = false)
196196
if(trim($remote_user['remote_ips']) == '') {
197197
$remote_allowed=true;
198198
} else {
199-
$ip = inet_pton($_SERVER['REMOTE_ADDR']);
199+
$ip_bin = inet_pton($ip);
200200
foreach($allowed_ips as $allowed) {
201-
if($ip == inet_pton(trim($allowed))) {
201+
if($ip_bin == inet_pton(trim($allowed))) {
202202
$remote_allowed=true;
203203
break;
204204
}

0 commit comments

Comments
 (0)