mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-13 20:06:57 +01:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user