diff options
author | Andrew Dolgov <[email protected]> | 2010-11-08 13:11:56 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-11-08 13:15:00 +0300 |
commit | 8801fb017ccd6e2c052ab449eed3ee1eb5b7e982 (patch) | |
tree | 97ce0dfd050cb22fc999c546bb9a9b8ce5277e89 /modules/pref-feeds.php | |
parent | 811bea05221c3704037eaba860a70f42eb45994b (diff) |
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
Diffstat (limited to 'modules/pref-feeds.php')
-rw-r--r-- | modules/pref-feeds.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 7a436cfd2..de9166fe4 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1447,7 +1447,8 @@ __('Export OPML')."</button>"; if (!get_pref($link, "_PREFS_OPML_PUBLISH_KEY")){ - set_pref($link, "_PREFS_OPML_PUBLISH_KEY", generate_publish_key()); + set_pref($link, "_PREFS_OPML_PUBLISH_KEY", + sha1(uniqid(rand(), true))); } print "<p>".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.'); @@ -1489,13 +1490,12 @@ print "<h3>".__("Published articles")."</h3>"; - if (!get_pref($link, "_PREFS_PUBLISH_KEY")) { - set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key()); - } - print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>"; - print "<button onclick=\"return displayDlg('pubUrl')\">". + $rss_url = '-2::' . htmlspecialchars(get_self_url_prefix() . + "/backend.php?op=rss&id=-2&view-mode=all_articles");; + + print "<button onclick=\"return displayDlg('generatedFeed', '$rss_url')\">". __('Display URL')."</button> "; |