summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-03-03 07:53:42 +0300
committerAndrew Dolgov <[email protected]>2019-03-03 07:53:42 +0300
commitc68ac04020d85a296c784de18f8def3f365f9f6a (patch)
tree8a08224d0336a38da61e188530e2ce29b6097dbe /include
parentcc57ed377544b5b8a07d18d3c59117654886649e (diff)
login: only allow relative URLs in return=
Diffstat (limited to 'include')
-rwxr-xr-xinclude/functions.php6
1 files changed, 6 insertions, 0 deletions
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'] != '';
+ }