Skip to content

Commit a191df1

Browse files
committed
Bug-fix.
Changelog excerpt: - Failed to correctly determine the client's IP address under certain circumstances (e.g., multiple choices available via HTTP_X_FORWARDED_FOR); Fixed.
1 parent aa47d3d commit a191df1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
3535
### v3.2.1
3636

3737
[2021.10.30; Maikuolan]: Code-style cleanup: Public before private properties, magic before public before private methods.
38+
39+
### v3.2.2
40+
41+
[2022.02.01; Bug-fix; Maikuolan]: Failed to correctly determine the client's IP address under certain circumstances (e.g., multiple choices available via HTTP_X_FORWARDED_FOR); Fixed.

src/Web.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: Upload handler (last modified: 2021.10.30).
11+
* This file: Upload handler (last modified: 2022.02.01).
1212
*/
1313

1414
namespace phpMussel\Web;
@@ -327,9 +327,7 @@ public function scan()
327327
$this->Loader->L10N->getString('field_date'),
328328
$this->Loader->timeFormat($this->Loader->Time, $this->Loader->Configuration['core']['time_format']),
329329
$this->Loader->L10N->getString('field_ip_address'),
330-
($this->Loader->Configuration['legal']['pseudonymise_ip_addresses'] ? $this->Loader->pseudonymiseIP(
331-
$_SERVER[$this->Loader->Configuration['core']['ipaddr']]
332-
) : $_SERVER[$this->Loader->Configuration['core']['ipaddr']]),
330+
$this->Loader->Configuration['legal']['pseudonymise_ip_addresses'] ? $this->Loader->pseudonymiseIP($this->IPAddr) : $this->IPAddr,
333331
$this->Loader->L10N->getString('field_header_scan_results_why_flagged'),
334332
$Detections,
335333
$this->Loader->L10N->getString('field_header_hash_reconstruction'),

0 commit comments

Comments
 (0)