Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API /reader/api/0/stream/items/contents #1774

Merged
merged 10 commits into from Feb 8, 2018

API favicons more robust when base_url is not set

  • Loading branch information...
Alkarex committed Feb 8, 2018
commit c3adf2ceadf2227604e69984569f38af0b3833b1
@@ -270,6 +270,8 @@ function subscriptionList() {
$res = $stm->fetchAll(PDO::FETCH_ASSOC);
$salt = FreshRSS_Context::$system_conf->salt;
$faviconsUrl = Minz_Url::display('/f.php?', '', true);
$faviconsUrl = str_replace('/api/greader.php/reader/api/0/subscription', '', $faviconsUrl); //Security if base_url is not set properly
$subscriptions = array();
foreach ($res as $line) {
@@ -286,7 +288,7 @@ function subscriptionList() {
//'firstitemmsec' => 0,
'url' => $line['url'],
'htmlUrl' => $line['website'],
'iconUrl' => Minz_Url::display('/f.php?' . hash('crc32b', $salt . $line['url']), '', true),
'iconUrl' => $faviconsUrl . hash('crc32b', $salt . $line['url']),
);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.