aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-25 23:02:41 -0700
committerzotlabs <mike@macgirvin.com>2018-03-25 23:02:41 -0700
commita92f22a4a40e2ad2c01ffa86be899bc20d991ce0 (patch)
tree3386b7b022b77c0c01a9f6a4fbf853d26c899400 /boot.php
parent2fc3f381ac3486e8c4910e70a3933a4b6718ba19 (diff)
downloadvolse-hubzilla-a92f22a4a40e2ad2c01ffa86be899bc20d991ce0.tar.gz
volse-hubzilla-a92f22a4a40e2ad2c01ffa86be899bc20d991ce0.tar.bz2
volse-hubzilla-a92f22a4a40e2ad2c01ffa86be899bc20d991ce0.zip
IDN: force baseurl to be punycode; for consistency and federation all internal urls are US-ASCII, unicode MAY be used for display.
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 6db71b8fb..62cd6ceb5 100755
--- a/boot.php
+++ b/boot.php
@@ -857,7 +857,7 @@ class App {
self::$scheme = 'https';
if(x($_SERVER,'SERVER_NAME')) {
- self::$hostname = $_SERVER['SERVER_NAME'];
+ self::$hostname = punify($_SERVER['SERVER_NAME']);
if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
self::$hostname .= ':' . $_SERVER['SERVER_PORT'];
@@ -954,14 +954,14 @@ class App {
&& is_array(self::$config['system'])
&& array_key_exists('baseurl',self::$config['system'])
&& strlen(self::$config['system']['baseurl'])) {
- $url = self::$config['system']['baseurl'];
+ $url = punify(self::$config['system']['baseurl']);
$url = trim($url,'\\/');
return $url;
}
$scheme = self::$scheme;
- self::$baseurl = $scheme . "://" . self::$hostname . ((isset(self::$path) && strlen(self::$path)) ? '/' . self::$path : '' );
+ self::$baseurl = $scheme . "://" . punify(self::$hostname) . ((isset(self::$path) && strlen(self::$path)) ? '/' . self::$path : '' );
return self::$baseurl;
}
@@ -972,7 +972,7 @@ class App {
&& is_array(self::$config['system'])
&& array_key_exists('baseurl',self::$config['system'])
&& strlen(self::$config['system']['baseurl'])) {
- $url = self::$config['system']['baseurl'];
+ $url = punify(self::$config['system']['baseurl']);
$url = trim($url,'\\/');
}
@@ -983,7 +983,7 @@ class App {
if($parsed !== false) {
self::$scheme = $parsed['scheme'];
- self::$hostname = $parsed['host'];
+ self::$hostname = punify($parsed['host']);
if(x($parsed,'port'))
self::$hostname .= ':' . $parsed['port'];
if(x($parsed,'path'))