mirror of
https://github.com/wallabag/wallabag.git
synced 2024-10-31 22:28:54 +00:00
check that URL are real ones before importing them (for instance, avoid bookmarklets)
This commit is contained in:
parent
3a690fad55
commit
ddbb2308a3
1 changed files with 1 additions and 1 deletions
|
@ -788,7 +788,7 @@ class Poche
|
|||
$urlsInserted = array(); //urls of articles inserted
|
||||
foreach($data as $record) {
|
||||
$url = trim(isset($record['article__url']) ? $record['article__url'] : (isset($record['url']) ? $record['url'] : ''));
|
||||
if ($url and !in_array($url, $urlsInserted)) {
|
||||
if (filter_var($url, FILTER_VALIDATE_URL) and !in_array($url, $urlsInserted)) {
|
||||
$title = (isset($record['title']) ? $record['title'] : _('Untitled - Import - ') . '</a> <a href="./?import">' . _('click to finish import') . '</a><a>');
|
||||
$body = (isset($record['content']) ? $record['content'] : '');
|
||||
$isRead = (isset($record['is_read']) ? intval($record['is_read']) : (isset($record['archive']) ? intval($record['archive']) : 0));
|
||||
|
|
Loading…
Reference in a new issue