Skip to content
Snippets Groups Projects
Commit de08f8b1 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3571

Closes #3571

Merge request studip/studip!2462
parent 96271c33
No related branches found
No related tags found
No related merge requests found
......@@ -351,7 +351,7 @@ class BlubberController extends AuthenticatedController
if (mb_strpos($file['type'], 'video') !== false) {
$type = 'video';
}
if (mb_strpos($file['type'], 'audio') !== false || mb_strpos($file_ref['name'], '.ogg') !== false) {
if (mb_strpos($file['type'], 'audio') !== false || mb_strpos($file['name'], '.ogg') !== false) {
$type = 'audio';
}
if ($type) {
......
......@@ -568,7 +568,8 @@ class StudipCoreFormat extends TextFormat
if (
in_array($pu['scheme'], ['http', 'https'])
&& (
$pu['host'] === $_SERVER['HTTP_HOST']
!isset($pu['host'])
|| $pu['host'] === $_SERVER['HTTP_HOST']
|| (isset($pu['port']) && $pu['host'] . ':' . $pu['port'] === $_SERVER['HTTP_HOST'])
)
&& mb_strpos($pu['path'], $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']) === 0
......
......@@ -313,7 +313,7 @@ function idna_link($link, $mail = false) {
return $link;
}
$pu = @parse_url($link);
if (preg_match('/&\w+;/i', $pu['host'])) { //umlaute? (html-coded)
if (isset($pu['host']) && preg_match('/&\w+;/i', $pu['host'])) { //umlaute? (html-coded)
$IDN = new Algo26\IdnaConvert\ToIdn();
$out = false;
if ($mail){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment