1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 07:06:30 +02:00

Fixed typo in prefs.php, which resulted in an empty pref post_scripts

Added check&update for pref post_scripts in 2.1.8 update routine
This commit is contained in:
Achim Ennenbach
2018-07-13 22:45:41 +02:00
parent 26d72ff21e
commit 8fea5fa53e
2 changed files with 15 additions and 4 deletions

View File

@@ -584,12 +584,25 @@ function update_core_database($type = '')
}
//todo add check for post_html pref value.
// Make sure, that the pref "post_script" contains one of the allowed userclasses
// Close possible security hole
if (!array_key_exists(e107::getPref('post_script'), e107::getUserClass()->uc_required_class_list('nobody,admin,main,classes,no-excludes', true)))
{
if ($just_check)
{
return update_needed("Pref 'Class which can post < script > and similar tags' contains an invalid value"); // NO LAN.
}
else
{
e107::getConfig()->setPref('post_script', 255)->save(false, true);
}
}
return $just_check;
}