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

fixes #3571

Closes #3571

Merge request studip/studip!2462
parent 43a01e11
No related branches found
No related tags found
No related merge requests found
...@@ -351,7 +351,7 @@ class BlubberController extends AuthenticatedController ...@@ -351,7 +351,7 @@ class BlubberController extends AuthenticatedController
if (mb_strpos($file['type'], 'video') !== false) { if (mb_strpos($file['type'], 'video') !== false) {
$type = 'video'; $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'; $type = 'audio';
} }
if ($type) { if ($type) {
......
...@@ -568,7 +568,8 @@ class StudipCoreFormat extends TextFormat ...@@ -568,7 +568,8 @@ class StudipCoreFormat extends TextFormat
if ( if (
in_array($pu['scheme'], ['http', 'https']) 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']) || (isset($pu['port']) && $pu['host'] . ':' . $pu['port'] === $_SERVER['HTTP_HOST'])
) )
&& mb_strpos($pu['path'], $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']) === 0 && mb_strpos($pu['path'], $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']) === 0
......
...@@ -330,7 +330,7 @@ function idna_link($link, $mail = false) { ...@@ -330,7 +330,7 @@ function idna_link($link, $mail = false) {
return $link; return $link;
} }
$pu = @parse_url($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(); $IDN = new Algo26\IdnaConvert\ToIdn();
$out = false; $out = false;
if ($mail){ if ($mail){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment