mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:55:56 +00:00
add basic safe mode which doesn't load any user plugins
This commit is contained in:
@@ -673,6 +673,7 @@ class Handler_Public extends Handler {
|
||||
$login = clean($_POST["login"]);
|
||||
$password = clean($_POST["password"]);
|
||||
$remember_me = clean($_POST["remember_me"]);
|
||||
$safe_mode = checkbox_to_sql_bool(clean($_POST["safe_mode"]));
|
||||
|
||||
if ($remember_me) {
|
||||
@session_set_cookie_params(SESSION_COOKIE_LIFETIME);
|
||||
@@ -689,6 +690,7 @@ class Handler_Public extends Handler {
|
||||
|
||||
$_SESSION["ref_schema_version"] = get_schema_version(true);
|
||||
$_SESSION["bw_limit"] = !!clean($_POST["bw_limit"]);
|
||||
$_SESSION["safe_mode"] = $safe_mode;
|
||||
|
||||
if (clean($_POST["profile"])) {
|
||||
|
||||
|
||||
@@ -858,6 +858,10 @@ class Pref_Prefs extends Handler_Protected {
|
||||
print_warning("Your PHP configuration has open_basedir restrictions enabled. Some plugins relying on CURL for functionality may not work correctly.");
|
||||
}
|
||||
|
||||
if ($_SESSION["safe_mode"]) {
|
||||
print_error("You have logged in using safe mode, no user plugins will be actually enabled until you login again.");
|
||||
}
|
||||
|
||||
$feed_handler_whitelist = [ "Af_Comics" ];
|
||||
|
||||
$feed_handlers = array_merge(
|
||||
|
||||
Reference in New Issue
Block a user