Skip to content
Snippets Groups Projects
Commit b754d14a authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

replace ip2long() with inet_pton(), fixes #4524

Closes #4524

Merge request studip/studip!3322
parent 4cf0f15e
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ class Admin_WebserviceAccessController extends AuthenticatedController
continue;
}
list($ip_address, $mask) = explode('/', $ip);
if (!ip2long($ip_address) || ($mask && ($mask < 8 || $mask > 30))) {
if (!inet_pton($ip_address) || ($mask && ($mask < 0 || $mask > 128))) {
$msg['error'][] = sprintf(_("Der IP Bereich %s ist ungültig."), htmlready($ip));
unset($rule->ip_range[$key]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment