bernd
* alle internen Links sinnvoll (und gleichartig!) encoden * Automatischer Upgrader für Drupal funktioniert jetzt
bernd commited d5f2f3f at 2009-03-07 14:48:53
<?php
require_once('inc/error.php');
function strong_password($password)
{
global $config;
if (isset($config['use_cracklib']) and $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