瀏覽代碼

Adds several strtolower() functions

Thomas Leister 10 年之前
父節點
當前提交
fb9b0459bc

+ 1 - 0
include/php/classes/user.class.php

@@ -65,6 +65,7 @@ class USER {
 		global $db;
 		// Prepare e-mail address
 		$email = $db->escape_string($email);
+		$email = strtolower($email);
 		$password = $db->escape_string($password);
 		$email_part = explode("@", $email);
 		$username = $email_part[0];

+ 1 - 0
include/php/pages/admin/createdomain.php

@@ -2,6 +2,7 @@
 
 if(isset($_POST['domain'])){
 	$domain = $db->escape_string($_POST['domain']);
+	$domain = strtolower($domain);
 	
 	if($domain !== ""){
 		// Check if domain exists in database

+ 4 - 0
include/php/pages/admin/editredirect.php

@@ -6,7 +6,9 @@
 			$id = $db->escape_string($_POST['id']);
 			
 			$source = $db->escape_string($_POST['source']);
+			$source = strtolower($source);
 			$destination = $db->escape_string($_POST['destination']);
+			$destination = strtolower($destination);
 			
 			if($source !== "" && $destination !== ""){
 			
@@ -27,7 +29,9 @@
 		
 		else if($savemode === "create"){
 			$source = $db->escape_string($_POST['source']);
+			$source = strtolower($source);
 			$destination = $db->escape_string($_POST['destination']);
+			$destination = strtolower($destination);
 			
 			if($source !== "" && $destination !== ""){
 				$sql = "INSERT INTO `".DBT_ALIASES."` (`".DBC_ALIASES_SOURCE."`, `".DBC_ALIASES_DESTINATION."`) VALUES ('$source', '$destination')";

+ 1 - 0
include/php/pages/admin/edituser.php

@@ -61,6 +61,7 @@
 		else if($savemode === "create"){
 			// Create mode entered
 			$username = $db->escape_string($_POST['username']);
+			$username = strtolower($username);
 			$domain = $db->escape_string($_POST['domain']);
 			if(defined('DBC_USERS_MAILBOXLIMIT')){
 				$mailbox_limit = $db->escape_string($_POST['mailbox_limit']);