I had a problem to allow guest to rate pictures. My Piwigo is behind a reverse proxy. All of guests are recognized as same user (even if there ip changes).
I looked at the code. I replaced $_SERVER["REMOTE_ADDR"]); with $_SERVER["HTTP_X_FORWARDED_FOR"]); and deleted the block
if (count($ip_components) > 3)
{
array_pop($ip_components);
}
in file functions_rate.inc.php, picture_rate.inc.php, functions.inc.php and functions_session.inc.php
It's just a little patch to correct the bug, but does it plane to manage reverse proxy or not in this situation ?
Regards
Hi,
I had a problem to allow guest to rate pictures. My Piwigo is behind a reverse proxy. All of guests are recognized as same user (even if there ip changes).
I looked at the code. I replaced `$_SERVER["REMOTE_ADDR"]);` with `$_SERVER["HTTP_X_FORWARDED_FOR"]);` and deleted the block
```
if (count($ip_components) > 3)
{
array_pop($ip_components);
}
```
in file functions_rate.inc.php, picture_rate.inc.php, functions.inc.php and functions_session.inc.php
It's just a little patch to correct the bug, but does it plane to manage reverse proxy or not in this situation ?
Regards
<!-- github-sync-id:375125257 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi,
I had a problem to allow guest to rate pictures. My Piwigo is behind a reverse proxy. All of guests are recognized as same user (even if there ip changes).
I looked at the code. I replaced
$_SERVER["REMOTE_ADDR"]);with$_SERVER["HTTP_X_FORWARDED_FOR"]);and deleted the blockin file functions_rate.inc.php, picture_rate.inc.php, functions.inc.php and functions_session.inc.php
It's just a little patch to correct the bug, but does it plane to manage reverse proxy or not in this situation ?
Regards