bernd
Erlaube * im Hostname
bernd commited c9a403b at 2009-06-01 14:35:31
<?php
require_once('inc/error.php');
function strong_password($password)
{
if (config('use_cracklib') === NULL or config('use_cracklib') === false) {
DEBUG('Cracklib deaktiviert');
return true;
}
DEBUG("Öffne Wörterbuch: ".config('cracklib_dict'));
if (! ($dict = crack_opendict(config('cracklib_dict'))))
{
logger("inc/security", "cracklib", "could not open cracklib-dictionary »".config('cracklib_dict')."«");
system_failure("Kann Crack-Lib-Wörterbuch nicht öffnen: ".config('cracklib_dict'));
}
// Führe eine Überprüfung des Passworts durch
$check = crack_check($dict, $password);
$message = crack_getlastmessage();
crack_closedict($dict);
if ($check === True)
{
DEBUG("Passwort ok");
return true;
}
else
{
DEBUG("Passwort nicht ok: {$message}");
return $message;
}
}
function filter_input_general( $input )
{
return htmlspecialchars(iconv('UTF-8', 'UTF-8', $input), ENT_QUOTES, 'UTF-8');
}
function verify_input_general( $input )
{
if (filter_input_general($input) != $input) {
system_failure("Ihre Daten enthielten ungültige Zeichen!");
logger('inc/security', 'verify_input_general', 'Ungültige Daten: '.$input);
}
}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX