mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-23 08:01:29 +00:00
replace old-style published feed with universal secretkey-based approach used for all feeds; do not allow user/pass handling in generated feed urls; bump schema
This commit is contained in:
@@ -464,25 +464,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "regenPubKey") {
|
||||
|
||||
print "<rpc-reply>";
|
||||
|
||||
set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key(), $_SESSION["uid"]);
|
||||
|
||||
$new_link = article_publish_url($link);
|
||||
|
||||
print "<link><![CDATA[$new_link]]></link>";
|
||||
|
||||
print "</rpc-reply>";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "regenOPMLKey") {
|
||||
|
||||
print "<rpc-reply>";
|
||||
set_pref($link, " _PREFS_OPML_PUBLISH_KEY", generate_publish_key(), $_SESSION["uid"]);
|
||||
set_pref($link, " _PREFS_OPML_PUBLISH_KEY",
|
||||
sha1(uniqid(rand(), true)), $_SESSION["uid"]);
|
||||
$new_link = opml_publish_url($link);
|
||||
print "<link><![CDATA[$new_link]]></link>";
|
||||
print "</rpc-reply>";
|
||||
@@ -1119,6 +1105,21 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if ($subop == "regenFeedKey") {
|
||||
$feed_id = db_escape_string($_REQUEST['id']);
|
||||
$is_cat = (bool) db_escape_string($_REQUEST['is_cat']);
|
||||
|
||||
print "<rpc-reply>";
|
||||
|
||||
$new_key = update_feed_access_key($link, $feed_id, $is_cat);
|
||||
|
||||
print "<link><![CDATA[$new_key]]></link>";
|
||||
|
||||
print "</rpc-reply>";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
print "<rpc-reply><error>Unknown method: $subop</error></rpc-reply>";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user