mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-02-23 20:54:23 +01:00
Check if URL is valid
This commit is contained in:
parent
19746ccb92
commit
a22cb98365
@ -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