From cf38d0881d67f3b106bb805dd8b42dbf4313cfce Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 14 Oct 2020 13:17:39 +0200 Subject: [PATCH] Fix --- conf/config.php | 207 -------------------- conf/systemd.service | 13 -- sources/patches/app-init.patch | 21 -- sources/patches/app-login_remote_user.patch | 21 -- sources/patches/app-update.patch | 21 -- 5 files changed, 283 deletions(-) delete mode 100644 conf/config.php delete mode 100644 conf/systemd.service delete mode 100644 sources/patches/app-init.patch delete mode 100644 sources/patches/app-login_remote_user.patch delete mode 100644 sources/patches/app-update.patch diff --git a/conf/config.php b/conf/config.php deleted file mode 100644 index a1db5ad..0000000 --- a/conf/config.php +++ /dev/null @@ -1,207 +0,0 @@ - System), syslog - logs to system log. - // Setting this to blank uses PHP logging (usually to http server - // error.log). - - define('CONFIG_VERSION', 26); - // Expected config version. Please update this option in config.php - // if necessary (after migrating all new options from this file). - - // vim:ft=php diff --git a/conf/systemd.service b/conf/systemd.service deleted file mode 100644 index 3adf23c..0000000 --- a/conf/systemd.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=News feed reader and aggregator -After=network.target mysql.service - -[Service] -User=__APP__ -Group=__APP__ -ExecStart=/usr/bin/php __FINALPATH__/update_daemon2.php -Restart=always -RestartSec=10 - -[Install] -WantedBy=multi-user.target diff --git a/sources/patches/app-init.patch b/sources/patches/app-init.patch deleted file mode 100644 index 5f0356a..0000000 --- a/sources/patches/app-init.patch +++ /dev/null @@ -1,21 +0,0 @@ -*** /plugins/auth_remote/init.php 2015-01-22 17:56:31.641845090 +0100 ---- /plugins/auth_remote/init.php.1 2015-02-20 09:23:16.515269911 +0100 -*************** -*** 69,74 **** ---- 69,84 ---- - db_query("UPDATE ttrss_users SET email = '$email' WHERE id = " . - $user_id); - } -+ // update user password to allow api access -+ if (isset($_SERVER['PHP_AUTH_PW'])){ -+ $currentpassword = $_SERVER['PHP_AUTH_PW']; -+ $new_salt = substr(bin2hex(get_random_bytes(125)), 0, 250); -+ $new_password_hash = encrypt_password($currentpassword, $new_salt, true); -+ -+ db_query("UPDATE ttrss_users SET -+ pwd_hash = '$new_password_hash', salt = '$new_salt', otp_enabled = false -+ WHERE login = '$try_login'"); -+ } - } - - return $user_id; diff --git a/sources/patches/app-login_remote_user.patch b/sources/patches/app-login_remote_user.patch deleted file mode 100644 index 0ae748b..0000000 --- a/sources/patches/app-login_remote_user.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- /include/functions.php -+++ /include/functions.php -@@ -825,6 +825,18 @@ - } - - } else { -+ /* We need to check that the "REMOTE_USER" and "uid" are same. -+ * If it has changed it's probably that the user logged out and -+ * was authenticated with a other username. -+ * In this case we need to reauthenticate the user -+ */ -+ if (AUTH_AUTO_LOGIN && $_SERVER["REMOTE_USER"] != $_SESSION["uid"]) { -+ if (authenticate_user(null, null)) { -+ $_SESSION["ref_schema_version"] = get_schema_version(true); -+ } else { -+ authenticate_user(null, null, true); -+ } -+ } - /* bump login timestamp */ - $sth = $pdo->prepare("UPDATE ttrss_users SET last_login = NOW() WHERE id = ?"); - $sth->execute([$_SESSION['uid']]); diff --git a/sources/patches/app-update.patch b/sources/patches/app-update.patch deleted file mode 100644 index 3dd871e..0000000 --- a/sources/patches/app-update.patch +++ /dev/null @@ -1,21 +0,0 @@ -*** /update.php 2015-02-20 09:41:40.231462387 +0100 ---- /update.php.1 2015-02-20 09:42:07.911466665 +0100 -*************** -*** 311,318 **** - _debug("WARNING: please backup your database before continuing."); - _debug("Type 'yes' to continue."); - -! if (read_stdin() != 'yes') -! exit; - - for ($i = $updater->getSchemaVersion() + 1; $i <= SCHEMA_VERSION; $i++) { - _debug("performing update up to version $i..."); ---- 311,318 ---- - _debug("WARNING: please backup your database before continuing."); - _debug("Type 'yes' to continue."); - -! //if (read_stdin() != 'yes') -! // exit; - - for ($i = $updater->getSchemaVersion() + 1; $i <= SCHEMA_VERSION; $i++) { - _debug("performing update up to version $i...");