Merge branch 'v3.2' into feature/cli_module

# Conflicts:
#	composer.json
#	composer.lock
#	lib/SP/Providers/Auth/Ldap/LdapMsAds.php
#	lib/SP/Services/Install/Installer.php
#	lib/SP/Util/Checks.php
#	lib/SP/Util/Link.php
#	public/js/app-actions.min.js
#	public/js/app-util.min.js
#	tests/res/scripts/reset_db.sh
This commit is contained in:
Rubén D
2021-09-19 21:40:27 +02:00
11 changed files with 7721 additions and 35 deletions

View File

@@ -171,8 +171,10 @@ final class Request
$forwarded = $this->headers->get('HTTP_FORWARDED');
if ($forwarded !== null &&
preg_match_all('/(?:for=([\w.:]+))|(?:for="\[([\w.:]+)\]")/i',
$forwarded, $matches)
preg_match_all(
'/(?:for=([\w.:]+))|(?:for="\[([\w.:]+)\]")/i',
$forwarded,
$matches)
) {
return array_filter(array_merge($matches[1], $matches[2]), function ($value) {
return !empty($value);
@@ -180,7 +182,7 @@ final class Request
}
// eg: X-Forwarded-For: 192.0.2.43, 2001:db8:cafe::17
$xForwarded = $this->headers->exists('HTTP_X_FORWARDED_FOR');
$xForwarded = $this->headers->get('HTTP_X_FORWARDED_FOR');
if ($xForwarded !== null) {
$matches = preg_split('/(?<=[\w])+,\s?/i',