Commit 2ae1eb77 authored by Florian Schaal's avatar Florian Schaal

allow empty remote-list - validate_remote_user.inc.php

parent d6ac29b6
......@@ -33,6 +33,8 @@ class validate_remote_user {
function valid_remote_ip($field_name, $field_value, $validator) {
global $app;
if(trim($field_value) == '') return;
$values = explode(',', $field_value);
$regex = '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/';
foreach($values as $cur_value) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment