fixes GHSA-gphq-34pv-gvf3 sanity check for table prefix during install

This commit is contained in:
plegall
2026-03-30 15:41:54 +02:00
parent c9af737962
commit 81f8d65a25

View File

@@ -266,6 +266,15 @@ if (isset($_POST['install']))
pwg_db_check_charset();
if (
strlen($prefixeTable) > 20
or preg_match('/^\d/', $prefixeTable)
or !preg_match('/^[a-zA-Z0-9_$]*$/u', $prefixeTable)
)
{
$errors[] = 'invalid table prefix';
}
$webmaster = trim(preg_replace('/\s{2,}/', ' ', $admin_name));
if (empty($webmaster))
{