Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1833)
+++ branches/2.8.x/CHANGELOG	(revision 1834)
@@ -13,6 +13,8 @@
 
 
 
+10 Dez-2012 Build 1834 Dietmar Woellbrink (Luisehahne)
+# fixed redirect checking in class.login.php
 10 Dez-2012 Build 1833 Dietmar Woellbrink (Luisehahne)
 # security fix CRLF injection/HTTP response splitting
 09 Dez-2012 Build 1832 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1833)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1834)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1833');
+if(!defined('REVISION')) define('REVISION', '1834');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/class.login.php
===================================================================
--- branches/2.8.x/wb/framework/class.login.php	(revision 1833)
+++ branches/2.8.x/wb/framework/class.login.php	(revision 1834)
@@ -69,20 +69,22 @@
 			$this->password_len = strlen($this->password);
 		}
 
+		$aServerUrl = $this->mb_parse_url(WB_URL);
+
         $sServerUrl = $_SERVER['SERVER_NAME'];        
-        $sServerScheme = $_SERVER['REQUEST_SCHEME'];        
+        $sServerScheme = isset($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME'] : isset($aServerUrl['scheme']) ? $aServerUrl['scheme'] : ' http';        
         $sServerPath = $_SERVER['SCRIPT_NAME'];        
 		// If the url is blank, set it to the default url
 		$this->url = $this->get_post('url');
-        $aUrl = parse_url( $this->url );
+        $aUrl = $this->mb_parse_url( $this->url );
         $this->url = isset($aRedirecthUrl['host']) &&($sServerUrl==$aUrl['host']) ? $this->url:ADMIN_URL.'/start/index.php';        
 		if ($this->redirect_url!='') {
-            $aRedirecthUrl = parse_url( $this->redirect_url );
+            $aRedirecthUrl = $this->mb_parse_url( $this->redirect_url );
             $this->redirect_url = isset($aRedirecthUrl['host']) &&($sServerUrl==$aRedirecthUrl['host']) ? $this->redirect_url:$sServerScheme.'://'.$sServerUrl;        
 			$this->url = $this->redirect_url;
 		}
 		if(strlen($this->url) < 2) {
-            $aDefaultUrl = parse_url( $this->default_url );
+            $aDefaultUrl = $this->mb_parse_url( $this->default_url );
             $this->default_url = isset($aDefaultUrl['host']) &&($sServerUrl==$aDefaultUrl['host']) ? $this->default_url:$sServerScheme.'://'.$sServerUrl;        
 			$this->url = $this->default_url;
 		}
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 1833)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 1834)
@@ -79,6 +79,21 @@
   	}
 
 
+    /**
+     * Created parse_url utf-8 compatible function
+     * 
+     * @param string $url The string to decode
+     * @return array Associative array containing the different components
+     * 
+     */
+    public function mb_parse_url($url) {
+        $encodedUrl = preg_replace('%[^:/?#&=\.]+%usDe', 'urlencode(\'$0\')', $url);
+        $components = parse_url($encodedUrl);
+        foreach ($components as &$component)
+            $component = urldecode($component);
+        return $components;
+    }
+
 /* ****************
  * check if one or more group_ids are in both group_lists
  *
