1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:15:55 +00:00

remove FEED_CRYPT_KEY and everything related to it

always assume auth_pass_encrypted is false
This commit is contained in:
Andrew Dolgov
2018-08-13 15:59:24 +03:00
parent eb43d9f4a8
commit 069aea5989
7 changed files with 5 additions and 95 deletions

View File

@@ -417,39 +417,6 @@
exit($rc);
}
if (isset($options["decrypt-feeds"])) {
if (!function_exists("mcrypt_decrypt")) {
_debug("mcrypt functions not available.");
return;
}
$res = $pdo->query("SELECT id, auth_pass FROM ttrss_feeds WHERE auth_pass_encrypted = true");
require_once "crypt.php";
$total = 0;
$pdo->beginTransaction();
$usth = $pdo->prepare("UPDATE ttrss_feeds SET auth_pass_encrypted = false, auth_pass = ?
WHERE id = ?");
while ($line = $res->fetch()) {
_debug("processing feed id " . $line["id"]);
$auth_pass = decrypt_string($line["auth_pass"]);
$usth->execute([$auth_pass, $line['id']]);
++$total;
}
$pdo->commit();
_debug("$total feeds processed.");
}
PluginHost::getInstance()->run_commands($options);
if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))