|
@@ 94-96 (lines=3) @@
|
| 91 |
|
if (!filter_var($decodedValue[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { |
| 92 |
|
throw new \UnexpectedValueException($this->l->t('The given IP range is not valid for IPv4'), 3); |
| 93 |
|
} |
| 94 |
|
if ($decodedValue[1] > 32 || $decodedValue[1] <= 0) { |
| 95 |
|
throw new \UnexpectedValueException($this->l->t('The given IP range is not valid for IPv4'), 4); |
| 96 |
|
} |
| 97 |
|
} else { |
| 98 |
|
if (!filter_var($decodedValue[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { |
| 99 |
|
throw new \UnexpectedValueException($this->l->t('The given IP range is not valid for IPv6'), 3); |
|
@@ 101-103 (lines=3) @@
|
| 98 |
|
if (!filter_var($decodedValue[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { |
| 99 |
|
throw new \UnexpectedValueException($this->l->t('The given IP range is not valid for IPv6'), 3); |
| 100 |
|
} |
| 101 |
|
if ($decodedValue[1] > 128 || $decodedValue[1] <= 0) { |
| 102 |
|
throw new \UnexpectedValueException($this->l->t('The given IP range is not valid for IPv6'), 4); |
| 103 |
|
} |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|