mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-21 17:52:10 +01:00
Improve protocols regex
This commit is contained in:
parent
bc1b9daa1d
commit
e85ecbed55
@ -70,7 +70,7 @@ class BookmarkController extends ApiController {
|
||||
|
||||
if ($from_own == 0) {
|
||||
// allow only http(s) and (s)ftp
|
||||
$protocols = '/^[hs]{0,1}[tf]{0,1}tp[s]{0,1}\:\/\//i';
|
||||
$protocols = '/^(https?|s?ftp)\:\/\//i';
|
||||
if (preg_match($protocols, $url)) {
|
||||
$datas = Bookmarks::getURLMetadata($url);
|
||||
// if not (allowed) protocol is given, assume http and https (and fetch both)
|
||||
|
Loading…
x
Reference in New Issue
Block a user