Commit Graph
6 Commits
Author SHA1 Message Date
Nihaal Shaikh 06a5f9c8c9 Fix #2 - Reject IP addresses that Moodle cannot match
The custom IP field and the predefined ranges form accepted invalid
entries such as 2001:db8::1garbage, 192.168.1.0/24garbage or
192.168.1.0/999. address_in_subnet() silently skips those entries, so a
"must not" restriction with a typo let blocked users in.

Validation now only accepts formats address_in_subnet() can match: a
single address, a subnet (mask 0-32 / 0-128) or a range in the last
group with end >= start. IPv6 forms cleanremoteaddr() cannot parse are
rejected as well. JS and PHP share the same rules; PHP also checks each
entry against address_in_subnet() as a safety net.

- Allow spaces after commas in the restriction field
- Support IPv6 ranges, e.g. 2001:db8::1-ff
- Add PHPUnit tests for helper::is_valid_ipaddress_list()
- Bump version to 2026101500 (5.3.2)
2026-10-15 09:04:58 +02:00
Luuk Verhoeven 150067f43d Update CHANGELOG.md 2026-10-14 10:51:13 +02:00
Nihaal Shaikh 00941bbc54 Update #124cwve5xb7 - Bump release to 5.3.0 for Moodle 5.3 support 2026-09-23 11:34:38 +02:00
Nihaal Shaikh cf5409707f Update #124cwve5xb7 - Bump release to 5.2.0 for Moodle 5.2 support 2026-09-23 11:01:30 +02:00
Hamza Tamyachte 4632008dfb Update CHANGELOG.md 2026-03-18 10:19:50 +01:00
Nihaal Shaikh 5dce3ed488 Update #86c8jzuvd - upgraded plugin to support Moodle 5.1, moved changelog to separate file 2026-03-03 13:26:17 +01:00