aboutsummaryrefslogtreecommitdiff
path: root/lib/functions.php
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2025-08-05 14:08:17 +0200
committerThomas Hackl <hackl@data-quest.de>2025-08-05 14:08:17 +0200
commit5b794550b4fa0bc892d924088466bf0065ecf2d7 (patch)
treeb8817c0ab0dceab5331f00aab023936fa1d482aa /lib/functions.php
parent66d91e7b81f978ae4d3b9254334427938599dee6 (diff)
Resolve BIEST 5764
Closes #5764 Merge request studip/studip!4404
Diffstat (limited to 'lib/functions.php')
-rw-r--r--lib/functions.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/functions.php b/lib/functions.php
index 3198cb1..ff71ea9 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -815,6 +815,10 @@ function get_title_for_status($type, $count, $sem_type = NULL)
*/
function is_internal_url($url)
{
+ if (mb_substr($url, 0, 2) === '//') {
+ $url = Request::protocol() . ':' . $url;
+ }
+
if (preg_match('%^[a-z]+:%', $url)) {
return mb_strpos($url, $GLOBALS['ABSOLUTE_URI_STUDIP']) === 0;
}