From c68ac04020d85a296c784de18f8def3f365f9f6a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 3 Mar 2019 07:53:42 +0300 Subject: login: only allow relative URLs in return= --- include/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/functions.php b/include/functions.php index 8c0654f3c..7f00f2f04 100755 --- a/include/functions.php +++ b/include/functions.php @@ -2562,3 +2562,9 @@ return $ts; } + + function is_absolute_url($url) { + $parts = parse_url($url); + + return $parts['host'] != ''; + } -- cgit v1.2.3