mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-19 16:54:27 +01:00
Check if URL is valid
This commit is contained in:
parent
d7730944ca
commit
63d1fc7b5e
@ -27,6 +27,12 @@ OCP\JSON::callCheck();
|
||||
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
// Check if it is a valid URL
|
||||
if (filter_var($_POST['url'], FILTER_VALIDATE_URL) === FALSE) {
|
||||
OC_JSON::error();
|
||||
exit();
|
||||
}
|
||||
|
||||
// If we go the dialog form submit
|
||||
if(isset($_POST['url'])) {
|
||||
$title = isset($_POST['title']) ? $_POST['title'] : '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user