moodle/.upgradenotes/MDL-79121-2024121616391169.yml
Julien Boulen 67d0069dad MDL-79121 lib: Normalize proxybypass value
This changes prevent the admin to define an incorrect proxybypass value.

Dropped out formats in MDL-74289 are now fixed automatically.
e.g.: "192.168." becomes "192.168.0.0/16" and ".domain.tld" becomes "*.domain.tld".
2024-12-16 15:54:52 +01:00

21 lines
865 B
YAML

issueNumber: MDL-79121
notes:
core:
- message: >
A new core\ip_utils::normalize_internet_address() method is created to
sanitize an IP address, a range of IP addresses, a domain name or a
wildcard domain matching pattern.
Moodle previously allowed entries such as 192.168. or .moodle.org for
certain variables (eg: $CFG->proxybypass). Since MDL-74289, these
formats are no longer allowed. This method converts this informations
into an authorized format. For example, 192.168. becomes 192.168.0.0/16
and .moodle.org becomes *.moodle.org.
Also a new core\ip_utils::normalize_internet_address_list() method is
created. Based on core\ip_utils::normalize_internet_address(), this
method normalizes a string containing a series of Internet addresses.
type: improved