The condition at line 111 will be met and the $change_theme_url variable will then contain an unsanitized query string resulting in XSS wherever $change_theme_url is used.
In admin.php @ line 102 we see the following code.
```php
// +-----------------------------------------------------------------------+
// | Variables init |
// +-----------------------------------------------------------------------+
$change_theme_url = PHPWG_ROOT_PATH.'admin.php?';
$test_get = $_GET;
unset($test_get['page']);
unset($test_get['section']);
unset($test_get['tag']);
if (count($test_get) == 0 and !empty($_SERVER['QUERY_STRING']))
{
$change_theme_url.= str_replace('&', '&', $_SERVER['QUERY_STRING']).'&';
}
$change_theme_url.= 'change_theme=1';
```
If we send Piwigo a url like:
admin.php?="><script>alert(1);</script>
The condition at line 111 will be met and the $change_theme_url variable will then contain an unsanitized query string resulting in XSS wherever $change_theme_url is used.
<!-- github-sync-id:493560651 -->
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.
In admin.php @ line 102 we see the following code.
If we send Piwigo a url like:
admin.php?="><script>alert(1);</script>
The condition at line 111 will be met and the $change_theme_url variable will then contain an unsanitized query string resulting in XSS wherever $change_theme_url is used.