mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Fix #1993 allow mailto: tel: and other valid link formats in menu shortcut target
This commit is contained in:
parent
24756fc08d
commit
86fd823264
1 changed files with 2 additions and 2 deletions
|
|
@ -501,7 +501,7 @@ class menuAdminController extends menu
|
||||||
$oDB->begin();
|
$oDB->begin();
|
||||||
|
|
||||||
// type is url
|
// type is url
|
||||||
if(strncasecmp('http', $request->shortcut_target, 4) === 0 || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
if (preg_match('!^([a-z]+:(//|[a-z0-9_-])|\.{0,2}/)!i', $request->shortcut_target))
|
||||||
{
|
{
|
||||||
// set menu variable
|
// set menu variable
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
|
|
@ -712,7 +712,7 @@ class menuAdminController extends menu
|
||||||
if($itemInfo->is_shortcut == 'Y')
|
if($itemInfo->is_shortcut == 'Y')
|
||||||
{
|
{
|
||||||
// type is url
|
// type is url
|
||||||
if(strncasecmp('http', $request->shortcut_target, 4) === 0 || preg_match('/^(\.\/|\.\.\/|\/).*$/', $request->shortcut_target))
|
if (preg_match('!^([a-z]+:(//|[a-z0-9_-])|\.{0,2}/)!i', $request->shortcut_target))
|
||||||
{
|
{
|
||||||
$args->url = $request->shortcut_target;
|
$args->url = $request->shortcut_target;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue