forked from GNUsocial/gnu-social
Import backlog on new subscription.
Danger is when importing a new feed that may be maliciously crafted to contain a zillion entries.
This commit is contained in:
@@ -53,9 +53,11 @@ if (!$sub) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// XXX: This could maybe be replaced with $sub->importFeed()
|
||||
|
||||
// Fetch the URL
|
||||
try {
|
||||
$xml = HTTPClient::quickGet($feedurl, 'text/html,application/xhtml+xml');
|
||||
$xml = HTTPClient::quickGet($feedurl, 'application/atom+xml');
|
||||
} catch (Exception $e) {
|
||||
echo sprintf("Could not fetch feedurl %s (%d).\n", $e->getMessage(), $e->getCode());
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user