parent
							
								
									794b229a35
								
							
						
					
					
						commit
						c884687e1a
					
				|  | @ -49,7 +49,7 @@ hostlistAttributes: #cn;#description;#uidNumber;#gidNumber | ||||||
| maxlistentries: 30 | maxlistentries: 30 | ||||||
| 
 | 
 | ||||||
| # default language (a line from config/language) | # default language (a line from config/language) | ||||||
| defaultLanguage: en_GB:ISO-8859-1:English (Britain) | defaultLanguage: en_GB:UTF-8:English (Britain) | ||||||
| 
 | 
 | ||||||
| # Path to external Script | # Path to external Script | ||||||
| scriptPath:  | scriptPath:  | ||||||
|  |  | ||||||
|  | @ -4,13 +4,13 @@ | ||||||
| # Normally you don't have to edit this file manually. It is modified automatically when you add a new language in the Configuration-Site. | # Normally you don't have to edit this file manually. It is modified automatically when you add a new language in the Configuration-Site. | ||||||
| 
 | 
 | ||||||
| # Englisch Language | # Englisch Language | ||||||
| en_GB:ISO-8859-1:English (Great Britain) | en_GB:UTF-8:English (Great Britain) | ||||||
| 
 | 
 | ||||||
| # German Language | # German Language | ||||||
| de_DE:ISO-8859-15:Deutsch (Deutschland) | de_DE:UTF-8:Deutsch (Deutschland) | ||||||
| 
 | 
 | ||||||
| # Hungarian Language | # Hungarian Language | ||||||
| hu_HU:ISO-8859-2:Magyar (Magyarorszag) | hu_HU:UTF-8:Magyar (Magyarorszag) | ||||||
| 
 | 
 | ||||||
| # Japanese Language | # Japanese Language | ||||||
| ja_JP.eucJP:EUC-JP:Japanese (EUC) | ja_JP.eucJP:EUC-JP:Japanese (EUC) | ||||||
|  |  | ||||||
|  | @ -117,10 +117,7 @@ class baseModule { | ||||||
| 			if (isset($this->attributes[$attribute])) { | 			if (isset($this->attributes[$attribute])) { | ||||||
| 				// decode as unicode
 | 				// decode as unicode
 | ||||||
| 				$this->attributes[$attribute] = $attr[$attribute]; | 				$this->attributes[$attribute] = $attr[$attribute]; | ||||||
| 				for ($i=0; $i<count($this->attributes[$attribute]); $i++) { | 				$this->orig[$attribute] = $attr[$attribute]; | ||||||
| 					$this->attributes[$attribute][$i] = utf8_decode ($this->attributes[$attribute][$i]); |  | ||||||
| 					$this->orig[$attribute][$i] = utf8_decode ($this->attributes[$attribute][$i]); |  | ||||||
| 				} |  | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		$this->attributes['objectClass'] = $objectClassName; | 		$this->attributes['objectClass'] = $objectClassName; | ||||||
|  |  | ||||||
|  | @ -221,9 +221,6 @@ class cache { | ||||||
| 					// Write new cache entry
 | 					// Write new cache entry
 | ||||||
| 					$addcache = $attr; | 					$addcache = $attr; | ||||||
| 					unset ($addcache['objectClass']); | 					unset ($addcache['objectClass']); | ||||||
| 					foreach ($addcache as $temp) |  | ||||||
| 						foreach ($temp as $temp2) |  | ||||||
| 							$temp2 = utf8_decode($temp2); |  | ||||||
| 					if (count($addcache)!=0) $this->ldapcache[$scope][$dn] = $attr; | 					if (count($addcache)!=0) $this->ldapcache[$scope][$dn] = $attr; | ||||||
| 					$entry = ldap_next_entry($_SESSION['ldap']->server(), $entry); | 					$entry = ldap_next_entry($_SESSION['ldap']->server(), $entry); | ||||||
| 					} | 					} | ||||||
|  | @ -311,7 +308,7 @@ class cache { | ||||||
| 		if (is_array($dn_groups)) { | 		if (is_array($dn_groups)) { | ||||||
| 			$DNs = array_keys($dn_groups); | 			$DNs = array_keys($dn_groups); | ||||||
| 			foreach ($DNs as $DN) | 			foreach ($DNs as $DN) | ||||||
| 				$return[] = utf8_decode($dn_groups[$DN][0]); | 				$return[] = $dn_groups[$DN][0]; | ||||||
| 			return $return; | 			return $return; | ||||||
| 			} | 			} | ||||||
| 		return array(); | 		return array(); | ||||||
|  | @ -327,7 +324,7 @@ class cache { | ||||||
| 			$DNs = array_keys($dn_groups); | 			$DNs = array_keys($dn_groups); | ||||||
| 			foreach ($DNs as $DN) { | 			foreach ($DNs as $DN) { | ||||||
| 				if ($dn_groups[$DN][0]==$gidNumber) | 				if ($dn_groups[$DN][0]==$gidNumber) | ||||||
| 					$return = utf8_decode(substr($DN, 3, strpos($DN, ',')-3)); | 					$return = substr($DN, 3, strpos($DN, ',')-3); | ||||||
| 				} | 				} | ||||||
| 			return $return; | 			return $return; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  | @ -1037,21 +1037,21 @@ class accountContainer { | ||||||
| 			for ($j=0; $j<count($orig[$attr_names[$i]]); $j++) { | 			for ($j=0; $j<count($orig[$attr_names[$i]]); $j++) { | ||||||
| 				if (is_array($attributes[$attr_names[$i]])) { | 				if (is_array($attributes[$attr_names[$i]])) { | ||||||
| 					if (!in_array($orig[$attr_names[$i]][$j], $attributes[$attr_names[$i]])) | 					if (!in_array($orig[$attr_names[$i]][$j], $attributes[$attr_names[$i]])) | ||||||
| 						if (($orig[$attr_names[$i]][$j]!='') && ($attr_names[$i]!='objectClass')) $torem[$attr_names[$i]][] =utf8_encode($orig[$attr_names[$i]][$j]); | 						if (($orig[$attr_names[$i]][$j]!='') && ($attr_names[$i]!='objectClass')) $torem[$attr_names[$i]][] = $orig[$attr_names[$i]][$j]; | ||||||
| 					} | 					} | ||||||
| 				else if (($orig[$attr_names[$i]][$j]!='') && ($attr_names[$i]!='objectClass')) $torem[$attr_names[$i]][] = utf8_encode($orig[$attr_names[$i]][$j]); | 				else if (($orig[$attr_names[$i]][$j]!='') && ($attr_names[$i]!='objectClass')) $torem[$attr_names[$i]][] = $orig[$attr_names[$i]][$j]; | ||||||
| 				} | 				} | ||||||
| 			for ($j=0; $j<count($attributes[$attr_names[$i]]); $j++) { | 			for ($j=0; $j<count($attributes[$attr_names[$i]]); $j++) { | ||||||
| 				if (is_array($orig[$attr_names[$i]])) { | 				if (is_array($orig[$attr_names[$i]])) { | ||||||
| 					if (!in_array($attributes[$attr_names[$i]][$j], $orig[$attr_names[$i]])) | 					if (!in_array($attributes[$attr_names[$i]][$j], $orig[$attr_names[$i]])) | ||||||
| 						if ($attributes[$attr_names[$i]][$j]!='') $toadd[$attr_names[$i]][] = utf8_encode($attributes[$attr_names[$i]][$j]); | 						if ($attributes[$attr_names[$i]][$j]!='') $toadd[$attr_names[$i]][] = $attributes[$attr_names[$i]][$j]; | ||||||
| 					} | 					} | ||||||
| 				else if ($attributes[$attr_names[$i]][$j]!='') $toadd[$attr_names[$i]][] = utf8_encode($attributes[$attr_names[$i]][$j]); | 				else if ($attributes[$attr_names[$i]][$j]!='') $toadd[$attr_names[$i]][] = $attributes[$attr_names[$i]][$j]; | ||||||
| 				} | 				} | ||||||
| 			for ($j=0; $j<count($attributes[$attr_names[$i]]); $j++) { | 			for ($j=0; $j<count($attributes[$attr_names[$i]]); $j++) { | ||||||
| 				if (is_array($orig[$attr_names[$i]]) && is_array($attributes[$attr_names[$i]])) { | 				if (is_array($orig[$attr_names[$i]]) && is_array($attributes[$attr_names[$i]])) { | ||||||
| 					if (($attributes[$attr_names[$i]][$j]==$orig[$attr_names[$i]][$j]) && $attributes[$attr_names[$i]][$j]!='') | 					if (($attributes[$attr_names[$i]][$j]==$orig[$attr_names[$i]][$j]) && $attributes[$attr_names[$i]][$j]!='') | ||||||
| 						$notchanged[$attr_names[$i]][] = utf8_encode($attributes[$attr_names[$i]][$j]); | 						$notchanged[$attr_names[$i]][] = $attributes[$attr_names[$i]][$j]; | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  | @ -288,22 +288,22 @@ class posixAccount extends baseModule { | ||||||
| 			if ($this->userPassword_no) { | 			if ($this->userPassword_no) { | ||||||
| 				$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | 				$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | ||||||
| 				} | 				} | ||||||
| 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0])); | 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | ||||||
| 			} | 			} | ||||||
| 		else { | 		else { | ||||||
| 			if (($this->attributes['userPassword'][0] != $this->orig['userPassword'][0] && $this->userPassword()!='' ) || $this->userPassword_no) { | 			if (($this->attributes['userPassword'][0] != $this->orig['userPassword'][0] && $this->userPassword()!='' ) || $this->userPassword_no) { | ||||||
| 				// Write new password
 | 				// Write new password
 | ||||||
| 				if ($this->userPassword_no) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | 				if ($this->userPassword_no) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | ||||||
| 					else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0])); | 					else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixAccount_pwdHash'][0]); | ||||||
| 				} | 				} | ||||||
| 			else { // No new password but old password
 | 			else { // No new password but old password
 | ||||||
| 				// (un)lock password
 | 				// (un)lock password
 | ||||||
| 				if ($this->userPassword_lock == pwd_is_enabled($this->orig['userPassword'][0])) { | 				if ($this->userPassword_lock == pwd_is_enabled($this->orig['userPassword'][0])) { | ||||||
| 					if ($this->userPassword_lock) { | 					if ($this->userPassword_lock) { | ||||||
| 						$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_disable($this->orig['userPassword'][0])); | 						$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_disable($this->orig['userPassword'][0]); | ||||||
| 					} | 					} | ||||||
| 					else { | 					else { | ||||||
| 						$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_enable($this->orig['userPassword'][0])); | 						$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_enable($this->orig['userPassword'][0]); | ||||||
| 					} | 					} | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  | @ -632,13 +632,13 @@ class posixGroup extends baseModule { | ||||||
| 			if ($this->userPassword_no) { | 			if ($this->userPassword_no) { | ||||||
| 				$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | 				$return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | ||||||
| 			} | 			} | ||||||
| 			else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0])); | 			else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
| 			if (($this->attributes['userPassword'][0] != $this->orig['userPassword'][0] && $this->userPassword()!='' ) || $this->userPassword_no) { | 			if (($this->attributes['userPassword'][0] != $this->orig['userPassword'][0] && $this->userPassword()!='' ) || $this->userPassword_no) { | ||||||
| 				// Write new password
 | 				// Write new password
 | ||||||
| 				if ($this->userPassword_no) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | 				if ($this->userPassword_no) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash('', !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | ||||||
| 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode(pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0])); | 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = pwd_hash($this->userPassword(), !$this->userPassword_lock, $this->moduleSettings['posixGroup_pwdHash'][0]); | ||||||
| 			} | 			} | ||||||
| 			else { // No new password but old password
 | 			else { // No new password but old password
 | ||||||
| 			// (un)lock password
 | 			// (un)lock password
 | ||||||
|  | @ -651,8 +651,8 @@ class posixGroup extends baseModule { | ||||||
| 				// remove trailing ! from password hash
 | 				// remove trailing ! from password hash
 | ||||||
| 				if ($passwd{0} == '!') $passwd = substr($passwd, 1); | 				if ($passwd{0} == '!') $passwd = substr($passwd, 1); | ||||||
| 				// Write new password
 | 				// Write new password
 | ||||||
| 				if ($this->userPassword_lock) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode("$crypt!$passwd"); | 				if ($this->userPassword_lock) $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = "$crypt!$passwd"; | ||||||
| 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = utf8_encode("$crypt$passwd"); | 				else $return[$_SESSION[$this->base]->dn]['modify']['userPassword'][0] = "$crypt$passwd"; | ||||||
| 			} | 			} | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
										
											Binary file not shown.
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -256,9 +256,9 @@ if (sizeof($grp_info) > 0) { | ||||||
| 						unset($grp_info[$i][strtolower($attr_array[$k])]['count']); | 						unset($grp_info[$i][strtolower($attr_array[$k])]['count']); | ||||||
| 						// sort array
 | 						// sort array
 | ||||||
| 						sort($grp_info[$i][strtolower($attr_array[$k])]); | 						sort($grp_info[$i][strtolower($attr_array[$k])]); | ||||||
| 						echo utf8_decode(implode("; ", $grp_info[$i][strtolower($attr_array[$k])])); | 						echo implode("; ", $grp_info[$i][strtolower($attr_array[$k])]); | ||||||
| 					} | 					} | ||||||
| 					else echo utf8_decode($grp_info[$i][strtolower($attr_array[$k])]); | 					else echo $grp_info[$i][strtolower($attr_array[$k])]; | ||||||
| 				} | 				} | ||||||
| 			} | 			} | ||||||
| 			echo ("</td>"); | 			echo ("</td>"); | ||||||
|  |  | ||||||
|  | @ -240,9 +240,9 @@ if (sizeof($hst_info) > 0) { | ||||||
| 				if (is_array($hst_info[$i][strtolower($attr_array[$k])])) { | 				if (is_array($hst_info[$i][strtolower($attr_array[$k])])) { | ||||||
| 					// sort array
 | 					// sort array
 | ||||||
| 					sort($hst_info[$i][strtolower($attr_array[$k])]); | 					sort($hst_info[$i][strtolower($attr_array[$k])]); | ||||||
| 					echo utf8_decode(implode("; ", $hst_info[$i][strtolower($attr_array[$k])])); | 					echo implode("; ", $hst_info[$i][strtolower($attr_array[$k])]); | ||||||
| 				} | 				} | ||||||
| 				else echo utf8_decode($hst_info[$i][strtolower($attr_array[$k])]); | 				else echo $hst_info[$i][strtolower($attr_array[$k])]; | ||||||
| 			} | 			} | ||||||
| 			echo ("</td>"); | 			echo ("</td>"); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -291,9 +291,9 @@ if ($user_count != 0) { | ||||||
| 					// sort array
 | 					// sort array
 | ||||||
| 					sort($userinfo[$i][strtolower($attr_array[$k])]); | 					sort($userinfo[$i][strtolower($attr_array[$k])]); | ||||||
| 					// print all attribute entries seperated by "; "
 | 					// print all attribute entries seperated by "; "
 | ||||||
| 					echo utf8_decode(implode("; ", $userinfo[$i][strtolower($attr_array[$k])])) . "\n"; | 					echo implode("; ", $userinfo[$i][strtolower($attr_array[$k])]) . "\n"; | ||||||
| 				} | 				} | ||||||
| 				else echo utf8_decode($userinfo[$i][strtolower($attr_array[$k])]) . "\n"; | 				else echo $userinfo[$i][strtolower($attr_array[$k])] . "\n"; | ||||||
| 			} | 			} | ||||||
| 		echo ("</td>\n"); | 		echo ("</td>\n"); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue