Browser language de-DE will be stored in Cookie lang. On login this value is invalid, an error message appears. After deleting this single cookie, login is working.
Here is the error message (German):
Piwigo ist auf einen nicht behebbaren Fehler gestoßen.
[Hacking attempt] the input parameter "de-DE" is not valid
Browser language de-DE will be stored in Cookie lang. On login this value is invalid, an error message appears. After deleting this single cookie, login is working.
Here is the error message (German):
Piwigo ist auf einen nicht behebbaren Fehler gestoßen.
[Hacking attempt] the input parameter "de-DE" is not valid
1 log_user /var/www/html/piwigo/include/functions_user.inc.php(1330)
2 pwg_login /var/www/html/piwigo/include/functions_plugins.inc.php(214)
3 trigger_change /var/www/html/piwigo/include/functions_user.inc.php(1238)
4 try_log_user /var/www/html/piwigo/identification.php(65)
<!-- github-sync-id:4088324797 -->
ie invalid "en_US" while "en_GB" is requested in the URL
During install, I also get this:
<img width="619" height="209" alt="Image" src="https://github.com/user-attachments/assets/31076038-b94a-44f7-9de6-061ac9823a87" />
ie invalid "en_US" while "en_GB" is requested in the URL
<!-- github-comment-id:4366169290 -->
I have no idea where this lang comes from. I don't have any idea where other variables come from. Certainly not from this fresh not-yet-installed instance of Piwigo. We need to be less "punitive" in function log_user I think.
I have added a code line to debug this at the beginning of `install.php`:
```
echo '<pre>'; print_r($_COOKIE); echo '</pre>';
```
and I get :
```
Array
(
[pwg_id] => 1bb6g9387f6hoolt0c8kmetn2f
[phavsz] => 2172x1478x2
[caps] => 2x1512x860
[ld_user] => 02154421f55f5d6fb8c7150338cc042e
[mode] => light
[lang] => en_US
)
```
I have no idea where this `lang` comes from. I don't have any idea where other variables come from. Certainly not from this fresh not-yet-installed instance of Piwigo. We need to be less "punitive" in function `log_user` I think.
<!-- github-comment-id:4366229170 -->
@HWFord I made a quick fix for Piwigo version 16.4.0 but we need to rethink a bit this management of $_COOKIE['lang']. We should use Piwigo cookie function pwg_get_cookie_var and pwg_set_cookie_var, to avoid mixing with other installs of Piwigo (or other web applications using the same cookie names) of the same host.
@HWFord I made a quick fix for Piwigo version 16.4.0 but we need to rethink a bit this management of `$_COOKIE['lang']`. We should use Piwigo cookie function `pwg_get_cookie_var` and `pwg_set_cookie_var`, to avoid mixing with other installs of Piwigo (or other web applications using the same cookie names) of the same host.
<!-- github-comment-id:4366256859 -->
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.
Browser language de-DE will be stored in Cookie lang. On login this value is invalid, an error message appears. After deleting this single cookie, login is working.
Here is the error message (German):
Piwigo ist auf einen nicht behebbaren Fehler gestoßen.
[Hacking attempt] the input parameter "de-DE" is not valid
1 log_user /var/www/html/piwigo/include/functions_user.inc.php(1330)
2 pwg_login /var/www/html/piwigo/include/functions_plugins.inc.php(214)
3 trigger_change /var/www/html/piwigo/include/functions_user.inc.php(1238)
4 try_log_user /var/www/html/piwigo/identification.php(65)
During install, I also get this:
ie invalid "en_US" while "en_GB" is requested in the URL
I have added a code line to debug this at the beginning of
install.php:and I get :
I have no idea where this
langcomes from. I don't have any idea where other variables come from. Certainly not from this fresh not-yet-installed instance of Piwigo. We need to be less "punitive" in functionlog_userI think.@HWFord I made a quick fix for Piwigo version 16.4.0 but we need to rethink a bit this management of
$_COOKIE['lang']. We should use Piwigo cookie functionpwg_get_cookie_varandpwg_set_cookie_var, to avoid mixing with other installs of Piwigo (or other web applications using the same cookie names) of the same host.See https://github.com/Piwigo/Piwigo/commit/f12323d1c9e6bff8f03d859758334115eb6d53c4