Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
# $Id: index.php 2207 2017-05-06 18:10:53Z tom.houdayer $
|
2 |
# $Id: index.php 2241 2017-05-20 22:32:36Z tom.houdayer $
|
3 |
#
|
3 |
#
|
4 |
# change user password on ALACASAR NAC
|
4 |
# change user password on ALACASAR NAC
|
5 |
# Copyright (C) 2003, 2004 Mondru AB.
|
5 |
# Copyright (C) 2003, 2004 Mondru AB.
|
6 |
# Copyright (C) 2008-20017 ANGEL95 & REXY
|
6 |
# Copyright (C) 2008-20017 ANGEL95 & REXY
|
7 |
|
7 |
|
- |
|
8 |
/****************************************************************
|
- |
|
9 |
* GLOBAL FILE PATHS *
|
- |
|
10 |
*****************************************************************/
|
8 |
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
|
11 |
define('CONF_FILE', '/usr/local/etc/alcasar.conf');
|
9 |
|
12 |
|
- |
|
13 |
/****************************************************************
|
- |
|
14 |
* FILE reading test *
|
- |
|
15 |
*****************************************************************/
|
- |
|
16 |
$conf_files = array(CONF_FILE);
|
- |
|
17 |
foreach ($conf_files as $file) {
|
- |
|
18 |
if (!file_exists($file)) {
|
- |
|
19 |
exit("Fichier $file non présent");
|
- |
|
20 |
}
|
- |
|
21 |
if (!is_readable($file)) {
|
- |
|
22 |
exit("Vous n'avez pas les droits de lecture sur le fichier $file");
|
- |
|
23 |
}
|
- |
|
24 |
}
|
- |
|
25 |
|
- |
|
26 |
/****************************************************************
|
10 |
// Read CONF_FILE
|
27 |
* Read CONF_FILE *
|
- |
|
28 |
*****************************************************************/
|
11 |
$file_conf = fopen(CONF_FILE, 'r');
|
29 |
$file_conf = fopen(CONF_FILE, 'r');
|
12 |
if (!$file_conf) {
|
30 |
if (!$file_conf) {
|
13 |
exit('Error opening the file '.CONF_FILE);
|
31 |
exit('Error opening the file '.CONF_FILE);
|
14 |
}
|
32 |
}
|
15 |
while (!feof($file_conf)) {
|
33 |
while (!feof($file_conf)) {
|
16 |
$tampon = fgets($file_conf, 4096);
|
34 |
$buffer = fgets($file_conf, 4096);
|
17 |
if ((strpos($tampon, '=') !== false) && (substr($tampon, 0, 1) !== '#')) {
|
35 |
if ((strpos($buffer, '=') !== false) && (substr($buffer, 0, 1) !== '#')) {
|
18 |
$tmp = explode('=', $tampon);
|
36 |
$tmp = explode('=', $buffer);
|
19 |
$conf[$tmp[0]] = trim($tmp[1]);
|
37 |
$conf[$tmp[0]] = trim($tmp[1]);
|
20 |
}
|
38 |
}
|
21 |
}
|
39 |
}
|
22 |
fclose($file_conf);
|
40 |
fclose($file_conf);
|
23 |
|
41 |
|
24 |
require('/etc/freeradius-web/config.php');
|
42 |
require('/etc/freeradius-web/config.php');
|
25 |
|
43 |
|
26 |
$current_page = htmlspecialchars($_SERVER['PHP_SELF']);
|
44 |
$current_page = htmlspecialchars($_SERVER['PHP_SELF']);
|
27 |
$homepage = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')) ? 'https' : 'http').'://'.trim($conf['HOSTNAME']).'.'.trim($conf['DOMAIN']);
|
45 |
$homepage = (((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')) ? 'https' : 'http').'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'];
|
28 |
|
46 |
|
29 |
# Choice of language
|
47 |
// Choice of language
|
30 |
$Language = 'en';
|
48 |
$Language = 'en';
|
31 |
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
|
49 |
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
32 |
$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
50 |
$Langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
33 |
$Language = strtolower(substr(chop($Langue[0]),0,2)); }
|
51 |
$Language = strtolower(substr(chop($Langue[0]), 0, 2));
|
34 |
if($Language == 'es'){
|
- |
|
35 |
$R_title = "User password change";
|
- |
|
36 |
$R_form_l1 = "User";
|
- |
|
37 |
$R_form_l2 = "Old password";
|
- |
|
38 |
$R_form_l3 = "New password";
|
- |
|
39 |
$R_form_l4 = "New password (confirmation)";
|
- |
|
40 |
$R_eval_pass = "Score :";
|
- |
|
41 |
$R_passwordmeter = "Powered by 'Shibbo Password Analyser'</a>";
|
- |
|
42 |
$R_form_button_valid = "Modify";
|
- |
|
43 |
$R_form_button_retour = "Cancel";
|
- |
|
44 |
$R_form_result1 = "Your password has been successfuly changed";
|
- |
|
45 |
$R_form_result2 = "Error when trying to change password";
|
- |
|
46 |
$R_retour = "ALCASAR home page";}
|
- |
|
47 |
else if ($Language == 'pt'){
|
- |
|
48 |
$R_title = "Alteração de senha do usuário";
|
- |
|
49 |
$R_form_l1 = "Usuário";
|
- |
|
50 |
$R_form_l2 = "Senha antiga";
|
- |
|
51 |
$R_form_l3 = "Nova senha";
|
- |
|
52 |
$R_form_l4 = "Nova senha (confirmação)";
|
- |
|
53 |
$R_eval_pass = "Resultado:";
|
- |
|
54 |
$R_passwordmeter = "Powered by 'Shibbo Password Analyser'</a>";
|
- |
|
55 |
$R_form_button_valid = "Modificar";
|
- |
|
56 |
$R_form_button_retour = "Cancelar";
|
- |
|
57 |
$R_form_result1 = "Sua senha foi alterada com sucesso";
|
- |
|
58 |
$R_form_result2 = "Erro ao tentar alterar a senha";
|
- |
|
59 |
$R_retour = "Home page Alcasar";}
|
- |
|
60 |
else if($Language == 'de'){
|
- |
|
61 |
$R_title = "User password change";
|
- |
|
62 |
$R_form_l1 = "User";
|
- |
|
63 |
$R_form_l2 = "Old password";
|
- |
|
64 |
$R_form_l3 = "New password";
|
- |
|
65 |
$R_form_l4 = "New password (confirmation)";
|
- |
|
66 |
$R_eval_pass = "Score :";
|
- |
|
67 |
$R_passwordmeter = "Powered by 'Shibbo Password Analyser'</a>";
|
- |
|
68 |
$R_form_button_valid = "Modify";
|
- |
|
69 |
$R_form_button_retour = "Cancel";
|
- |
|
70 |
$R_form_result1 = "Your password has been successfuly changed";
|
- |
|
71 |
$R_form_result2 = "Error when trying to change password";
|
- |
|
72 |
$R_retour = "ALCASAR home page";}
|
- |
|
73 |
else if($Language == 'nl'){
|
- |
|
74 |
$R_title = "User password change";
|
- |
|
75 |
$R_form_l1 = "User";
|
- |
|
76 |
$R_form_l2 = "Old password";
|
- |
|
77 |
$R_form_l3 = "New password";
|
- |
|
78 |
$R_form_l4 = "New password (confirmation)";
|
- |
|
79 |
$R_eval_pass = "Score :";
|
- |
|
80 |
$R_passwordmeter = "Powered by 'Shibbo Password Analyser'</a>";
|
- |
|
81 |
$R_form_button_valid = "Modify";
|
- |
|
82 |
$R_form_button_retour = "Cancel";
|
- |
|
83 |
$R_form_result1 = "Your password has been successfuly changed";
|
- |
|
84 |
$R_form_result2 = "Error when trying to change password";
|
- |
|
85 |
$R_retour = "ALCASAR home page";}
|
- |
|
86 |
else if($Language == 'zh'){
|
- |
|
87 |
$R_title = "修改用户密码";
|
- |
|
88 |
$R_form_l1 = "用户";
|
- |
|
89 |
$R_form_l2 = "旧密码";
|
- |
|
90 |
$R_form_l3 = "新密码";
|
- |
|
91 |
$R_form_l4 = "新密码(确认)";
|
- |
|
92 |
$R_eval_pass = "";
|
- |
|
93 |
$R_passwordmeter = "技术支持 'Shibbo Password Analyser'</a>";
|
- |
|
94 |
$R_form_button_valid = "修改";
|
- |
|
95 |
$R_form_button_retour = "取消";
|
- |
|
96 |
$R_form_result1 = "您的密码已成功修改";
|
- |
|
97 |
$R_form_result2 = "修改密码出错";
|
- |
|
98 |
$R_retour = "返回首页";}
|
- |
|
99 |
else if ($Language == 'ar'){
|
- |
|
100 |
$R_title = "تغيير كلمة المرور للمستخدم";
|
- |
|
101 |
$R_form_l1 = "المستعمل";
|
- |
|
102 |
$R_form_l2 = "كلمه السر القديمة";
|
- |
|
103 |
$R_form_l3 = "كلمة السر الجديدة";
|
- |
|
104 |
$R_form_l4 = "كلمة السر الجديدة (أكد)";
|
- |
|
105 |
$R_eval_pass = "";
|
- |
|
106 |
$R_passwordmeter = "مشغل بواسطة 'Shibbo Password Analyser'" . "</a>";
|
- |
|
107 |
$R_form_button_valid = "تغيير";
|
- |
|
108 |
$R_form_button_retour = "إلغاء";
|
- |
|
109 |
$R_form_result1 = "تم تغيير الرقم السري بنجاح";
|
- |
|
110 |
$R_form_result2 = "خطأ عند محاولة تغيير كلمة المرور";
|
- |
|
111 |
$R_retour = "رجوع إلى الصفحة الرئيسية ALCASAR";
|
- |
|
112 |
}
|
52 |
}
|
- |
|
53 |
if ($Language === 'es') { // Spanish
|
- |
|
54 |
$l_title = "User password change";
|
- |
|
55 |
$l_form_l1 = "User";
|
- |
|
56 |
$l_form_l2 = "Old password";
|
- |
|
57 |
$l_form_l3 = "New password";
|
- |
|
58 |
$l_form_l4 = "New password (confirmation)";
|
- |
|
59 |
$l_eval_pass = "Score :";
|
- |
|
60 |
$l_passwordmeter = "Powered by 'Shibbo Password Analyser'";
|
- |
|
61 |
$l_form_button_valid = "Modify";
|
- |
|
62 |
$l_form_button_retour = "Cancel";
|
- |
|
63 |
$l_form_result1 = "Your password has been successfuly changed";
|
- |
|
64 |
$l_form_result2 = "Error when trying to change password";
|
- |
|
65 |
} else if ($Language === 'pt') { // Portuguese
|
- |
|
66 |
$l_title = "Alteração de senha do usuário";
|
- |
|
67 |
$l_form_l1 = "Usuário";
|
- |
|
68 |
$l_form_l2 = "Senha antiga";
|
- |
|
69 |
$l_form_l3 = "Nova senha";
|
- |
|
70 |
$l_form_l4 = "Nova senha (confirmação)";
|
- |
|
71 |
$l_eval_pass = "Resultado:";
|
- |
|
72 |
$l_passwordmeter = "Powered by 'Shibbo Password Analyser'";
|
- |
|
73 |
$l_form_button_valid = "Modificar";
|
- |
|
74 |
$l_form_button_retour = "Cancelar";
|
- |
|
75 |
$l_form_result1 = "Sua senha foi alterada com sucesso";
|
- |
|
76 |
$l_form_result2 = "Erro ao tentar alterar a senha";
|
- |
|
77 |
} else if ($Language === 'de') { // German
|
- |
|
78 |
$l_title = "User password change";
|
- |
|
79 |
$l_form_l1 = "User";
|
- |
|
80 |
$l_form_l2 = "Old password";
|
- |
|
81 |
$l_form_l3 = "New password";
|
- |
|
82 |
$l_form_l4 = "New password (confirmation)";
|
- |
|
83 |
$l_eval_pass = "Score :";
|
- |
|
84 |
$l_passwordmeter = "Powered by 'Shibbo Password Analyser'";
|
- |
|
85 |
$l_form_button_valid = "Modify";
|
- |
|
86 |
$l_form_button_retour = "Cancel";
|
- |
|
87 |
$l_form_result1 = "Your password has been successfuly changed";
|
- |
|
88 |
$l_form_result2 = "Error when trying to change password";
|
- |
|
89 |
} else if ($Language === 'nl') { // Dutch
|
- |
|
90 |
$l_title = "User password change";
|
- |
|
91 |
$l_form_l1 = "User";
|
- |
|
92 |
$l_form_l2 = "Old password";
|
- |
|
93 |
$l_form_l3 = "New password";
|
- |
|
94 |
$l_form_l4 = "New password (confirmation)";
|
- |
|
95 |
$l_eval_pass = "Score :";
|
- |
|
96 |
$l_passwordmeter = "Powered by 'Shibbo Password Analyser'";
|
- |
|
97 |
$l_form_button_valid = "Modify";
|
- |
|
98 |
$l_form_button_retour = "Cancel";
|
- |
|
99 |
$l_form_result1 = "Your password has been successfuly changed";
|
- |
|
100 |
$l_form_result2 = "Error when trying to change password";
|
- |
|
101 |
} else if ($Language === 'zh') { // Chinese
|
- |
|
102 |
$l_title = "修改用户密码";
|
- |
|
103 |
$l_form_l1 = "用户";
|
- |
|
104 |
$l_form_l2 = "旧密码";
|
- |
|
105 |
$l_form_l3 = "新密码";
|
- |
|
106 |
$l_form_l4 = "新密码(确认)";
|
- |
|
107 |
$l_eval_pass = ""; // TODO: to translate
|
- |
|
108 |
$l_passwordmeter = "技术支持 'Shibbo Password Analyser'";
|
- |
|
109 |
$l_form_button_valid = "修改";
|
- |
|
110 |
$l_form_button_retour = "取消";
|
- |
|
111 |
$l_form_result1 = "您的密码已成功修改";
|
- |
|
112 |
$l_form_result2 = "修改密码出错";
|
- |
|
113 |
} else if ($Language === 'ar') { // Arabic
|
- |
|
114 |
$l_title = "تغيير كلمة المرور للمستخدم";
|
- |
|
115 |
$l_form_l1 = "المستعمل";
|
- |
|
116 |
$l_form_l2 = "كلمه السر القديمة";
|
- |
|
117 |
$l_form_l3 = "كلمة السر الجديدة";
|
- |
|
118 |
$l_form_l4 = "كلمة السر الجديدة (أكد)";
|
- |
|
119 |
$l_eval_pass = ""; // TODO: to translate
|
- |
|
120 |
$l_passwordmeter = "مشغل بواسطة 'Shibbo Password Analyser'";
|
- |
|
121 |
$l_form_button_valid = "تغيير";
|
- |
|
122 |
$l_form_button_retour = "إلغاء";
|
- |
|
123 |
$l_form_result1 = "تم تغيير الرقم السري بنجاح";
|
- |
|
124 |
$l_form_result2 = "خطأ عند محاولة تغيير كلمة المرور";
|
113 |
else if($Language == 'fr'){
|
125 |
} else if ($Language === 'fr') { // French
|
114 |
$R_title = "Changement de mot de passe utilisateur";
|
126 |
$l_title = "Changement de mot de passe utilisateur";
|
115 |
$R_form_l1 = "Utilisateur :";
|
127 |
$l_form_l1 = "Utilisateur :";
|
116 |
$R_form_l2 = "Ancien mot de passe :";
|
128 |
$l_form_l2 = "Ancien mot de passe :";
|
117 |
$R_form_l3 = "Nouveau mot de passe :";
|
129 |
$l_form_l3 = "Nouveau mot de passe :";
|
118 |
$R_form_l4 = "Nouveau mot de passe (confirmation) :";
|
130 |
$l_form_l4 = "Nouveau mot de passe (confirmation) :";
|
119 |
$R_eval_pass = "";
|
131 |
$l_eval_pass = "Score :";
|
120 |
$R_passwordmeter = "Propulsé par 'Shibbo Password Analyser'</a>";
|
132 |
$l_passwordmeter = "Propulsé par 'Shibbo Password Analyser'";
|
121 |
$R_form_button_valid = "Modifier";
|
133 |
$l_form_button_valid = "Modifier";
|
122 |
$R_form_button_retour = "Annuler";
|
134 |
$l_form_button_retour = "Annuler";
|
123 |
$R_form_result1 = "Votre mot de passe a été modifié avec succès";
|
135 |
$l_form_result1 = "Votre mot de passe a été modifié avec succès";
|
124 |
$R_form_result2 = "Erreur de changement de mot de passe";
|
136 |
$l_form_result2 = "Erreur de changement de mot de passe";
|
125 |
$R_retour = "Retour à la page d'accueil ALCASAR";}
|
- |
|
126 |
else {
|
137 |
} else { // English
|
127 |
$R_title = "User password change";
|
138 |
$l_title = "User password change";
|
128 |
$R_form_l1 = "User";
|
139 |
$l_form_l1 = "User";
|
129 |
$R_form_l2 = "Old password";
|
140 |
$l_form_l2 = "Old password";
|
130 |
$R_form_l3 = "New password";
|
141 |
$l_form_l3 = "New password";
|
131 |
$R_form_l4 = "New password (confirmation)";
|
142 |
$l_form_l4 = "New password (confirmation)";
|
132 |
$R_eval_pass = "Score :";
|
143 |
$l_eval_pass = "Score:";
|
133 |
$R_passwordmeter = "Powered by 'Shibbo Password Analyser'</a>";
|
144 |
$l_passwordmeter = "Powered by 'Shibbo Password Analyser'";
|
134 |
$R_form_button_valid = "Modify";
|
145 |
$l_form_button_valid = "Modify";
|
135 |
$R_form_button_retour = "Cancel";
|
146 |
$l_form_button_retour = "Cancel";
|
136 |
$R_form_result1 = "Your password has been successfuly changed";
|
147 |
$l_form_result1 = "Your password has been successfuly changed";
|
137 |
$R_form_result2 = "Error when trying to change password";
|
148 |
$l_form_result2 = "Error when trying to change password";
|
- |
|
149 |
}
|
- |
|
150 |
|
- |
|
151 |
if (isset($action)) {
|
- |
|
152 |
if ($action === 'checkpass') {
|
- |
|
153 |
if (!is_file("../acc/manager/lib/sql/drivers/$config[sql_type]/functions.php")) {
|
- |
|
154 |
exit('<b>Could not include SQL library</b>');
|
- |
|
155 |
}
|
- |
|
156 |
require_once("../acc/manager/lib/sql/drivers/$config[sql_type]/functions.php");
|
- |
|
157 |
$link = @da_sql_pconnect($config);
|
- |
|
158 |
if ($link) {
|
- |
|
159 |
$sql = "SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login' AND attribute = '$config[sql_password_attribute]';";
|
- |
|
160 |
$res = @da_sql_query($link,$config, $sql);
|
- |
|
161 |
if ($res) {
|
- |
|
162 |
$row = @da_sql_fetch_array($res, $config);
|
- |
|
163 |
if (!is_file("crypt/$config[general_encryption_method].php")) {
|
- |
|
164 |
exit('<b>Could not open encryption library file</b>');
|
- |
|
165 |
}
|
- |
|
166 |
include("crypt/$config[general_encryption_method].php");
|
138 |
$R_retour = "ALCASAR home page";
|
167 |
$enc_passwd = $row['value'];
|
- |
|
168 |
$passwd = da_encrypt($passwd,$enc_passwd);
|
- |
|
169 |
$newpasswd = da_encrypt($newpasswd,$enc_passwd);
|
- |
|
170 |
$newpasswd2 = da_encrypt($newpasswd2,$enc_passwd);
|
- |
|
171 |
if (($passwd === $enc_passwd) && ($newpasswd === $newpasswd2)) {
|
- |
|
172 |
$sql = "UPDATE $config[sql_check_table] SET value='$newpasswd' WHERE username = '$login' AND attribute = '$config[sql_password_attribute]';";
|
- |
|
173 |
$res2 = @da_sql_query($link, $config, $sql);
|
- |
|
174 |
$changePasswordMessage = '<font color=blue><b>'.$l_form_result1.'</b></font>';
|
- |
|
175 |
} else {
|
- |
|
176 |
$changePasswordMessage = '<font color=red><b>'.$l_form_result2.'</b></font>';
|
- |
|
177 |
}
|
- |
|
178 |
}
|
- |
|
179 |
}
|
- |
|
180 |
}
|
139 |
}
|
181 |
}
|
- |
|
182 |
|
140 |
echo "
|
183 |
// Cleaning the cache
|
- |
|
184 |
header('Expires: Tue, 01 Jan 2000 00:00:00 GMT');
|
141 |
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
|
185 |
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
- |
|
186 |
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
- |
|
187 |
header('Cache-Control: post-check=0, pre-check=0', false);
|
- |
|
188 |
header('Pragma: no-cache');
|
- |
|
189 |
?>
|
- |
|
190 |
<!DOCTYPE html>
|
142 |
<html>
|
191 |
<html>
|
143 |
<head>
|
192 |
<head>
|
144 |
<title>$R_title</title>
|
193 |
<meta charset="UTF-8">
|
145 |
<meta http-equiv=\"Cache-control\" content=\"no-cache\">
|
- |
|
146 |
<meta http-equiv=\"Pragma\" content=\"no-cache\">
|
194 |
<title>ALCASAR - <?= $l_title ?></title>
|
147 |
<link rel=\"stylesheet\" href=\"../css/pass.css\" type=\"text/css\">
|
195 |
<link rel="stylesheet" href="../css/pass.css" type="text/css">
|
148 |
<link rel=\"stylesheet\" href=\"../css/style_intercept.css\" type=\"text/css\">
|
196 |
<link rel="stylesheet" href="../css/style_intercept.css" type="text/css">
|
149 |
<link type=\"text/css\" href=\"../css/pwdmeter.css\" media=\"screen\" rel=\"stylesheet\" />
|
197 |
<link rel="stylesheet" href="../css/pwdmeter.css" type="text/css">
|
150 |
<!--[if lt IE 7]>
|
198 |
<!--[if lt IE 7]>
|
151 |
<link type=\"text/css\" href=\"../css/ie.css\" media=\"screen\" rel=\"stylesheet\" />
|
199 |
<link rel="stylesheet" href="../css/ie.css" type="text/css">
|
152 |
<![endif]-->
|
200 |
<![endif]-->
|
153 |
<script type=\"text/javascript\" src=\"js/pwdmeter.js\" language=\"javascript\"></script>
|
- |
|
154 |
<script type=\"text/javascript\">
|
201 |
<script src="js/pwdmeter.js"></script>
|
155 |
function valoriserDiv5(param){
|
- |
|
156 |
document.getElementById(\"box_info\").innerHTML = param.innerHTML;
|
- |
|
157 |
}
|
- |
|
158 |
</script>
|
- |
|
159 |
</head>
|
202 |
</head>
|
160 |
<body onload=\"valoriserDiv5(text_conn);\">
|
203 |
<body>
|
161 |
<div id=\"cadre_titre\" class=\"titre_controle\">
|
204 |
<div id="cadre_titre" class="titre_controle">
|
162 |
<p id=\"acces_controle\" class=\"titre_controle\">$R_title</p>
|
205 |
<p id="acces_controle" class="titre_controle"><?= $l_title ?></p>
|
163 |
<div id=\"boite_logo\">
|
- |
|
164 |
<img src=\"/images/organisme.png\">
|
206 |
<div id="boite_logo"><img src="/images/organisme.png"></div>
|
165 |
</div>
|
- |
|
166 |
</div>
|
207 |
</div>
|
167 |
<div id=\"contenu_acces\">
|
208 |
<div id="contenu_acces">
|
168 |
<form name=\"master\" action=\"$current_page\" method=\"post\">
|
209 |
<form name="master" action="<?= $current_page ?>" method="post">
|
169 |
<input type=hidden name=action value=checkpass>
|
210 |
<input type="hidden" name="action" value="checkpass">
|
170 |
<table id=\"champs_pass\" border=\"0\">
|
211 |
<table id="champs_pass" border="0">
|
171 |
<tr>
|
- |
|
172 |
<td class=\"first_item\">$R_form_l1</td>
|
- |
|
173 |
<td><input type=\"text\" name=\"login\" value=\"\" label=\"test\"></td>
|
- |
|
174 |
</tr>
|
- |
|
175 |
<tr>
|
- |
|
176 |
<td class=\"first_item\">$R_form_l2</td>
|
- |
|
177 |
<td><input type=\"password\" name=\"passwd\" value=\"\"></td>
|
- |
|
178 |
</tr>
|
- |
|
179 |
<tr>
|
- |
|
180 |
<td class=\"first_item\">$R_form_l3</td>
|
- |
|
181 |
<td>
|
- |
|
182 |
<input type=\"password\" name=\"newpasswd\" id=\"passwordPwd\" value=\"\" autocomplete=\"off\" onkeyup=\"chkPass(this.value);\" />
|
- |
|
183 |
<input type=\"text\" id=\"passwordTxt\" name=\"passwordTxt\" autocomplete=\"off\" onkeyup=\"chkPass(this.value);\" class=\"hide\" />
|
- |
|
184 |
</td>
|
- |
|
185 |
</tr>
|
- |
|
186 |
<tr>
|
- |
|
187 |
<td class=\"first_item\">$R_eval_pass</td>
|
- |
|
188 |
<td>
|
- |
|
189 |
<div id=\"scorebarBorder\">
|
- |
|
190 |
<div id=\"score\">0%</div>
|
- |
|
191 |
<div id=\"scorebar\"> </div>
|
- |
|
192 |
</div>
|
- |
|
193 |
<div id=\"complexity\"></div>
|
- |
|
194 |
</td>
|
- |
|
195 |
</tr>
|
- |
|
196 |
<tr>
|
- |
|
197 |
<td colspan=\"2\" id=\"lien_pass\">$R_passwordmeter</td>
|
- |
|
198 |
</tr>
|
- |
|
199 |
<tr>
|
- |
|
200 |
<td class=\"first_item\">$R_form_l4</td>
|
- |
|
201 |
<td><input type=\"password\" name=\"newpasswd2\" value=\"\"></td>
|
- |
|
202 |
</tr>
|
- |
|
203 |
<tr>
|
- |
|
204 |
<td colspan=\"2\" id=\"lien_pass\">
|
- |
|
205 |
<input type=\"submit\" class=\"btn_form\" id=\"btn_pass\" value=\"$R_form_button_valid\">
|
- |
|
206 |
<input type=\"button\" class=\"btn_form\" id=\"btn_retour\" value=\"$R_form_button_retour\" onclick=\"location.replace('$homepage');\">
|
- |
|
207 |
</td>
|
- |
|
208 |
</tr>
|
- |
|
209 |
</table>
|
- |
|
210 |
</div>
|
- |
|
211 |
</div>
|
- |
|
212 |
<div id=\"info_pass\">
|
- |
|
213 |
<table id=\"tablePwdStatus\" cellpadding=\"5\" cellspacing=\"1\" border=\"0\">
|
- |
|
214 |
<tr>
|
- |
|
215 |
<th colspan=\"2\">Additions</th>
|
- |
|
216 |
<th class=\"txtCenter\">Type</th>
|
- |
|
217 |
<th class=\"txtCenter\">Rate</th>
|
- |
|
218 |
<th class=\"txtCenter\">Count</th>
|
- |
|
219 |
<th class=\"txtCenter\">Bonus</th>
|
- |
|
220 |
</tr>
|
- |
|
221 |
<tr>
|
212 |
<tr>
|
222 |
<td width=\"1%\"><div id=\"div_nLength\" class=\"fail\"> </div></td>
|
- |
|
223 |
<td width=\"94%\">Number of Characters</td>
|
213 |
<td class="first_item"><?= $l_form_l1 ?></td>
|
224 |
<td width=\"1%\" class=\"txtCenter\">Flat</td>
|
- |
|
225 |
<td width=\"1%\" class=\"txtCenter italic\">+(n*4)</td>
|
- |
|
226 |
<td width=\"1%\"><div id=\"nLength\" class=\"box\"> </div></td>
|
214 |
<td><input type="text" name="login" value="" label="test"></td>
|
227 |
<td width=\"1%\"><div id=\"nLengthBonus\" class=\"boxPlus\"> </div></td>
|
- |
|
228 |
</tr>
|
215 |
</tr>
|
229 |
<tr>
|
216 |
<tr>
|
230 |
<td><div id=\"div_nAlphaUC\" class=\"fail\"> </div></td>
|
- |
|
231 |
<td>Uppercase Letters</td>
|
- |
|
232 |
<td class=\"txtCenter\">Cond/Incr</td>
|
217 |
<td class="first_item"><?= $l_form_l2 ?></td>
|
233 |
<td nowrap=\"nowrap\" class=\"txtCenter italic\">+((len-n)*2)</td>
|
- |
|
234 |
<td><div id=\"nAlphaUC\" class=\"box\"> </div></td>
|
- |
|
235 |
<td><div id=\"nAlphaUCBonus\" class=\"boxPlus\"> </div></td>
|
- |
|
236 |
</tr>
|
- |
|
237 |
<tr>
|
- |
|
238 |
<td><div id=\"div_nAlphaLC\" class=\"fail\"> </div></td>
|
- |
|
239 |
<td>Lowercase Letters</td>
|
- |
|
240 |
<td class=\"txtCenter\">Cond/Incr</td>
|
- |
|
241 |
<td class=\"txtCenter italic\">+((len-n)*2)</td>
|
- |
|
242 |
<td><div id=\"nAlphaLC\" class=\"box\"> </div></td>
|
218 |
<td><input type="password" name="passwd" value=""></td>
|
243 |
<td><div id=\"nAlphaLCBonus\" class=\"boxPlus\"> </div></td>
|
- |
|
244 |
</tr>
|
219 |
</tr>
|
245 |
<tr>
|
220 |
<tr>
|
246 |
<td><div id=\"div_nNumber\" class=\"fail\"> </div></td>
|
- |
|
247 |
<td>Numbers</td>
|
- |
|
248 |
<td class=\"txtCenter\">Cond</td>
|
- |
|
249 |
<td class=\"txtCenter italic\">+(n*4)</td>
|
221 |
<td class="first_item"><?= $l_form_l3 ?></td>
|
250 |
<td><div id=\"nNumber\" class=\"box\"> </div></td>
|
- |
|
251 |
<td><div id=\"nNumberBonus\" class=\"boxPlus\"> </div></td>
|
- |
|
252 |
</tr>
|
- |
|
253 |
<tr>
|
- |
|
254 |
<td><div id=\"div_nSymbol\" class=\"fail\"> </div></td>
|
- |
|
255 |
<td>Symbols</td>
|
- |
|
256 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
257 |
<td class=\"txtCenter italic\">+(n*6)</td>
|
- |
|
258 |
<td><div id=\"nSymbol\" class=\"box\"> </div></td>
|
- |
|
259 |
<td><div id=\"nSymbolBonus\" class=\"boxPlus\"> </div></td>
|
- |
|
260 |
</tr>
|
- |
|
261 |
<tr>
|
222 |
<td>
|
262 |
<td><div id=\"div_nMidChar\" class=\"fail\"> </div></td>
|
- |
|
263 |
<td>Middle Numbers or Symbols</td>
|
- |
|
264 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
265 |
<td class=\"txtCenter italic\">+(n*2)</td>
|
- |
|
266 |
<td><div id=\"nMidChar\" class=\"box\"> </div></td>
|
- |
|
267 |
<td><div id=\"nMidCharBonus\" class=\"boxPlus\"> </div></td>
|
223 |
<input type="password" name="newpasswd" id="passwordPwd" value="" autocomplete="off" onkeyup="chkPass(this.value);" />
|
268 |
</tr>
|
- |
|
269 |
<tr>
|
- |
|
270 |
<td><div id=\"div_nRequirements\" class=\"fail\"> </div></td>
|
- |
|
271 |
<td>Requirements</td>
|
- |
|
272 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
273 |
<td class=\"txtCenter italic\">+(n*2)</td>
|
- |
|
274 |
<td><div id=\"nRequirements\" class=\"box\"> </div></td>
|
- |
|
275 |
<td><div id=\"nRequirementsBonus\" class=\"boxPlus\"> </div></td>
|
224 |
<input type="text" id="passwordTxt" name="passwordTxt" autocomplete="off" onkeyup="chkPass(this.value);" class="hide" />
|
276 |
</tr>
|
- |
|
277 |
<tr>
|
225 |
</td>
|
278 |
<th colspan=\"6\">Deductions</th>
|
- |
|
279 |
</tr>
|
226 |
</tr>
|
280 |
<tr>
|
227 |
<tr>
|
281 |
<td width=\"1%\"><div id=\"div_nAlphasOnly\" class=\"pass\"> </div></td>
|
- |
|
282 |
<td width=\"94%\">Letters Only</td>
|
- |
|
283 |
<td width=\"1%\" class=\"txtCenter\">Flat</td>
|
- |
|
284 |
<td width=\"1%\" class=\"txtCenter italic\">-n</td>
|
- |
|
285 |
<td width=\"1%\"><div id=\"nAlphasOnly\" class=\"box\"> </div></td>
|
- |
|
286 |
<td width=\"1%\"><div id=\"nAlphasOnlyBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
287 |
</tr>
|
- |
|
288 |
<tr>
|
- |
|
289 |
<td><div id=\"div_nNumbersOnly\" class=\"pass\"> </div></td>
|
- |
|
290 |
<td>Numbers Only</td>
|
- |
|
291 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
292 |
<td class=\"txtCenter italic\">-n</td>
|
228 |
<td class="first_item"><?= $l_eval_pass ?></td>
|
293 |
<td><div id=\"nNumbersOnly\" class=\"box\"> </div></td>
|
- |
|
294 |
<td><div id=\"nNumbersOnlyBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
295 |
</tr>
|
- |
|
296 |
<tr>
|
- |
|
297 |
<td><div id=\"div_nRepChar\" class=\"pass\"> </div></td>
|
- |
|
298 |
<td>Repeat Characters (Case Insensitive)</td>
|
- |
|
299 |
<td class=\"txtCenter\">Comp</td>
|
- |
|
300 |
<td nowrap=\"nowrap\" class=\"txtCenter italic\"> - </td>
|
- |
|
301 |
<td><div id=\"nRepChar\" class=\"box\"> </div></td>
|
- |
|
302 |
<td><div id=\"nRepCharBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
303 |
</tr>
|
- |
|
304 |
<tr>
|
- |
|
305 |
<td><div id=\"div_nConsecAlphaUC\" class=\"pass\"> </div></td>
|
- |
|
306 |
<td>Consecutive Uppercase Letters</td>
|
- |
|
307 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
308 |
<td class=\"txtCenter italic\">-(n*2)</td>
|
- |
|
309 |
<td><div id=\"nConsecAlphaUC\" class=\"box\"> </div></td>
|
- |
|
310 |
<td><div id=\"nConsecAlphaUCBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
311 |
</tr>
|
- |
|
312 |
<tr>
|
- |
|
313 |
<td><div id=\"div_nConsecAlphaLC\" class=\"pass\"> </div></td>
|
- |
|
314 |
<td>Consecutive Lowercase Letters</td>
|
- |
|
315 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
316 |
<td class=\"txtCenter italic\">-(n*2)</td>
|
- |
|
317 |
<td><div id=\"nConsecAlphaLC\" class=\"box\"> </div></td>
|
- |
|
318 |
<td><div id=\"nConsecAlphaLCBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
319 |
</tr>
|
- |
|
320 |
<tr>
|
229 |
<td>
|
321 |
<td><div id=\"div_nConsecNumber\" class=\"pass\"> </div></td>
|
- |
|
322 |
<td>Consecutive Numbers</td>
|
230 |
<div id="scorebarBorder">
|
323 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
324 |
<td class=\"txtCenter italic\">-(n*2)</td>
|
- |
|
325 |
<td><div id=\"nConsecNumber\" class=\"box\"> </div></td>
|
- |
|
326 |
<td><div id=\"nConsecNumberBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
327 |
</tr>
|
- |
|
328 |
<tr>
|
- |
|
329 |
<td><div id=\"div_nSeqAlpha\" class=\"pass\"> </div></td>
|
- |
|
330 |
<td>Sequential Letters (3+)</td>
|
- |
|
331 |
<td class=\"txtCenter\">Flat</td>
|
231 |
<div id="score">0%</div>
|
332 |
<td class=\"txtCenter italic\">-(n*3)</td>
|
- |
|
333 |
<td><div id=\"nSeqAlpha\" class=\"box\"> </div></td>
|
232 |
<div id="scorebar"> </div>
|
334 |
<td><div id=\"nSeqAlphaBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
335 |
</tr>
|
- |
|
336 |
<tr>
|
- |
|
337 |
<td><div id=\"div_nSeqNumber\" class=\"pass\"> </div></td>
|
- |
|
338 |
<td>Sequential Numbers (3+)</td>
|
- |
|
339 |
<td class=\"txtCenter\">Flat</td>
|
- |
|
340 |
<td class=\"txtCenter italic\">-(n*3)</td>
|
- |
|
341 |
<td><div id=\"nSeqNumber\" class=\"box\"> </div></td>
|
- |
|
342 |
<td><div id=\"nSeqNumberBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
343 |
</tr>
|
233 |
</div>
|
344 |
<tr>
|
- |
|
345 |
<td><div id=\"div_nSeqSymbol\" class=\"pass\"> </div></td>
|
- |
|
346 |
<td>Sequential Symbols (3+)</td>
|
- |
|
347 |
<td class=\"txtCenter\">Flat</td>
|
234 |
<div id="complexity"></div>
|
348 |
<td class=\"txtCenter italic\">-(n*3)</td>
|
- |
|
349 |
<td><div id=\"nSeqSymbol\" class=\"box\"> </div></td>
|
- |
|
350 |
<td><div id=\"nSeqSymbolBonus\" class=\"boxMinus\"> </div></td>
|
- |
|
351 |
</tr>
|
235 |
</td>
|
352 |
<tr>
|
- |
|
353 |
<th colspan=\"6\">Legend</th>
|
- |
|
354 |
</tr>
|
236 |
</tr>
|
355 |
<tr>
|
237 |
<tr>
|
356 |
<td colspan=\"6\">
|
238 |
<td colspan="2" id="lien_pass"><?= $l_passwordmeter ?></td>
|
357 |
<ul id=\"listLegend\">
|
- |
|
358 |
<li><div class=\"exceed imgLegend\"> </div> <span class=\"bold\">Exceptional:</span> Exceeds minimum standards. Additional bonuses are applied.</li>
|
- |
|
359 |
<li><div class=\"pass imgLegend\"> </div> <span class=\"bold\">Sufficient:</span> Meets minimum standards. Additional bonuses are applied.</li>
|
- |
|
360 |
<li><div class=\"warn imgLegend\"> </div> <span class=\"bold\">Warning:</span> Advisory against employing bad practices. Overall score is reduced.</li>
|
- |
|
361 |
<li><div class=\"fail imgLegend\"> </div> <span class=\"bold\">Failure:</span> Does not meet the minimum standards. Overall score is reduced.</li>
|
- |
|
362 |
</ul>
|
- |
|
363 |
</td>
|
- |
|
364 |
</tr>
|
239 |
</tr>
|
365 |
</table>
|
- |
|
366 |
<table id=\"tablePwdNotes\" cellpadding=\"5\" cellspacing=\"1\" border=\"0\">
|
- |
|
367 |
<tr>
|
240 |
<tr>
|
368 |
<th>Quick Footnotes</th>
|
241 |
<td class="first_item"><?= $l_form_l4 ?></td>
|
- |
|
242 |
<td><input type="password" name="newpasswd2" value=""></td>
|
369 |
</tr>
|
243 |
</tr>
|
370 |
<tr>
|
244 |
<tr>
|
371 |
<td>
|
- |
|
372 |
• <strong>Flat:</strong> Rates that add/remove in non-changing increments.<br />
|
- |
|
373 |
• <strong>Incr:</strong> Rates that add/remove in adjusting increments.<br />
|
- |
|
374 |
• <strong>Cond:</strong> Rates that add/remove depending on additional factors.<br />
|
- |
|
375 |
• <strong>Comp:</strong> Rates that are too complex to summarize. See source code for details.<br />
|
- |
|
376 |
• <strong>n:</strong> Refers to the total number of occurrences.<br />
|
- |
|
377 |
• <strong>len:</strong> Refers to the total password length.<br />
|
245 |
<td colspan="2" id="lien_pass">
|
378 |
• Additional bonus scores are given for increased character variety.<br />
|
- |
|
379 |
• Final score is a cumulative result of all bonuses minus deductions.<br />
|
246 |
<input type="submit" class="btn_form" id="btn_pass" value="<?= $l_form_button_valid ?>">
|
380 |
• Final score is capped with a minimum of 0 and a maximum of 100.<br />
|
- |
|
381 |
• Score and Complexity ratings are not conditional on meeting minimum requirements.<br />
|
247 |
<input type="button" class="btn_form" id="btn_retour" value="<?= $l_form_button_retour ?>" onclick="window.location = '<?= $homepage ?>';">
|
382 |
</td>
|
248 |
</td>
|
383 |
</tr>
|
249 |
</tr>
|
- |
|
250 |
<?php if (isset($changePasswordMessage)): ?>
|
- |
|
251 |
<tr>
|
- |
|
252 |
<td colspan="2"><?= $changePasswordMessage ?></td>
|
- |
|
253 |
</tr>
|
- |
|
254 |
<?php endif; ?>
|
384 |
</table>
|
255 |
</table>
|
- |
|
256 |
</form>
|
385 |
</div>
|
257 |
</div>
|
- |
|
258 |
<div id="info_pass">
|
- |
|
259 |
<table id="tablePwdStatus" cellpadding="5" cellspacing="1" border="0">
|
386 |
";
|
260 |
<tr>
|
387 |
if (isset($action)){
|
261 |
<th colspan="2">Additions</th>
|
388 |
if ($action == 'checkpass'){
|
262 |
<th class="txtCenter">Type</th>
|
- |
|
263 |
<th class="txtCenter">Rate</th>
|
- |
|
264 |
<th class="txtCenter">Count</th>
|
- |
|
265 |
<th class="txtCenter">Bonus</th>
|
- |
|
266 |
</tr>
|
- |
|
267 |
<tr>
|
389 |
if (is_file("../acc/manager/lib/sql/drivers/$config[sql_type]/functions.php"))
|
268 |
<td width="1%"><div id="div_nLength" class="fail"> </div></td>
|
- |
|
269 |
<td width="94%">Number of Characters</td>
|
- |
|
270 |
<td width="1%" class="txtCenter">Flat</td>
|
- |
|
271 |
<td width="1%" class="txtCenter italic">+(n*4)</td>
|
- |
|
272 |
<td width="1%"><div id="nLength" class="box"> </div></td>
|
390 |
include_once("../acc/manager/lib/sql/drivers/$config[sql_type]/functions.php");
|
273 |
<td width="1%"><div id="nLengthBonus" class="boxPlus"> </div></td>
|
- |
|
274 |
</tr>
|
391 |
else{
|
275 |
<tr>
|
392 |
echo "<b>Could not include SQL library</b><br>\n";
|
276 |
<td><div id="div_nAlphaUC" class="fail"> </div></td>
|
- |
|
277 |
<td>Uppercase Letters</td>
|
- |
|
278 |
<td class="txtCenter">Cond/Incr</td>
|
- |
|
279 |
<td nowrap="nowrap" class="txtCenter italic">+((len-n)*2)</td>
|
- |
|
280 |
<td><div id="nAlphaUC" class="box"> </div></td>
|
- |
|
281 |
<td><div id="nAlphaUCBonus" class="boxPlus"> </div></td>
|
393 |
exit();
|
282 |
</tr>
|
- |
|
283 |
<tr>
|
- |
|
284 |
<td><div id="div_nAlphaLC" class="fail"> </div></td>
|
- |
|
285 |
<td>Lowercase Letters</td>
|
- |
|
286 |
<td class="txtCenter">Cond/Incr</td>
|
- |
|
287 |
<td class="txtCenter italic">+((len-n)*2)</td>
|
- |
|
288 |
<td><div id="nAlphaLC" class="box"> </div></td>
|
- |
|
289 |
<td><div id="nAlphaLCBonus" class="boxPlus"> </div></td>
|
- |
|
290 |
</tr>
|
394 |
}
|
291 |
<tr>
|
- |
|
292 |
<td><div id="div_nNumber" class="fail"> </div></td>
|
- |
|
293 |
<td>Numbers</td>
|
395 |
$link = @da_sql_pconnect($config);
|
294 |
<td class="txtCenter">Cond</td>
|
- |
|
295 |
<td class="txtCenter italic">+(n*4)</td>
|
- |
|
296 |
<td><div id="nNumber" class="box"> </div></td>
|
- |
|
297 |
<td><div id="nNumberBonus" class="boxPlus"> </div></td>
|
396 |
if ($link){
|
298 |
</tr>
|
- |
|
299 |
<tr>
|
- |
|
300 |
<td><div id="div_nSymbol" class="fail"> </div></td>
|
- |
|
301 |
<td>Symbols</td>
|
397 |
$res = @da_sql_query($link,$config,
|
302 |
<td class="txtCenter">Flat</td>
|
- |
|
303 |
<td class="txtCenter italic">+(n*6)</td>
|
- |
|
304 |
<td><div id="nSymbol" class="box"> </div></td>
|
398 |
"SELECT attribute,value FROM $config[sql_check_table] WHERE username = '$login'
|
305 |
<td><div id="nSymbolBonus" class="boxPlus"> </div></td>
|
- |
|
306 |
</tr>
|
- |
|
307 |
<tr>
|
399 |
AND attribute = '$config[sql_password_attribute]';");
|
308 |
<td><div id="div_nMidChar" class="fail"> </div></td>
|
- |
|
309 |
<td>Middle Numbers or Symbols</td>
|
- |
|
310 |
<td class="txtCenter">Flat</td>
|
- |
|
311 |
<td class="txtCenter italic">+(n*2)</td>
|
- |
|
312 |
<td><div id="nMidChar" class="box"> </div></td>
|
- |
|
313 |
<td><div id="nMidCharBonus" class="boxPlus"> </div></td>
|
400 |
if ($res){
|
314 |
</tr>
|
- |
|
315 |
<tr>
|
- |
|
316 |
<td><div id="div_nRequirements" class="fail"> </div></td>
|
- |
|
317 |
<td>Requirements</td>
|
- |
|
318 |
<td class="txtCenter">Flat</td>
|
401 |
$row = @da_sql_fetch_array($res,$config);
|
319 |
<td class="txtCenter italic">+(n*2)</td>
|
- |
|
320 |
<td><div id="nRequirements" class="box"> </div></td>
|
402 |
if (is_file("crypt/$config[general_encryption_method].php")){
|
321 |
<td><div id="nRequirementsBonus" class="boxPlus"> </div></td>
|
- |
|
322 |
</tr>
|
- |
|
323 |
<tr>
|
- |
|
324 |
<th colspan="6">Deductions</th>
|
- |
|
325 |
</tr>
|
- |
|
326 |
<tr>
|
- |
|
327 |
<td width="1%"><div id="div_nAlphasOnly" class="pass"> </div></td>
|
- |
|
328 |
<td width="94%">Letters Only</td>
|
- |
|
329 |
<td width="1%" class="txtCenter">Flat</td>
|
- |
|
330 |
<td width="1%" class="txtCenter italic">-n</td>
|
- |
|
331 |
<td width="1%"><div id="nAlphasOnly" class="box"> </div></td>
|
- |
|
332 |
<td width="1%"><div id="nAlphasOnlyBonus" class="boxMinus"> </div></td>
|
- |
|
333 |
</tr>
|
- |
|
334 |
<tr>
|
403 |
include("crypt/$config[general_encryption_method].php");
|
335 |
<td><div id="div_nNumbersOnly" class="pass"> </div></td>
|
- |
|
336 |
<td>Numbers Only</td>
|
404 |
$enc_passwd = $row['value'];
|
337 |
<td class="txtCenter">Flat</td>
|
405 |
$passwd = da_encrypt($passwd,$enc_passwd);
|
338 |
<td class="txtCenter italic">-n</td>
|
- |
|
339 |
<td><div id="nNumbersOnly" class="box"> </div></td>
|
- |
|
340 |
<td><div id="nNumbersOnlyBonus" class="boxMinus"> </div></td>
|
- |
|
341 |
</tr>
|
- |
|
342 |
<tr>
|
406 |
$newpasswd = da_encrypt($newpasswd,$enc_passwd);
|
343 |
<td><div id="div_nRepChar" class="pass"> </div></td>
|
407 |
$newpasswd2 = da_encrypt($newpasswd2,$enc_passwd);
|
344 |
<td>Repeat Characters (Case Insensitive)</td>
|
- |
|
345 |
<td class="txtCenter">Comp</td>
|
408 |
if (($passwd == $enc_passwd) and ($newpasswd == $newpasswd2)){
|
346 |
<td nowrap="nowrap" class="txtCenter italic"> - </td>
|
- |
|
347 |
<td><div id="nRepChar" class="box"> </div></td>
|
409 |
$msg = '<font color=blue><b>'.$R_form_result1.'</b></font>';
|
348 |
<td><div id="nRepCharBonus" class="boxMinus"> </div></td>
|
- |
|
349 |
</tr>
|
- |
|
350 |
<tr>
|
- |
|
351 |
<td><div id="div_nConsecAlphaUC" class="pass"> </div></td>
|
410 |
$res2 = @da_sql_query($link,$config,
|
352 |
<td>Consecutive Uppercase Letters</td>
|
- |
|
353 |
<td class="txtCenter">Flat</td>
|
- |
|
354 |
<td class="txtCenter italic">-(n*2)</td>
|
411 |
"UPDATE $config[sql_check_table] set value='$newpasswd' WHERE username = '$login'
|
355 |
<td><div id="nConsecAlphaUC" class="box"> </div></td>
|
412 |
AND attribute = '$config[sql_password_attribute]';");}
|
356 |
<td><div id="nConsecAlphaUCBonus" class="boxMinus"> </div></td>
|
- |
|
357 |
</tr>
|
413 |
else
|
358 |
<tr>
|
- |
|
359 |
<td><div id="div_nConsecAlphaLC" class="pass"> </div></td>
|
- |
|
360 |
<td>Consecutive Lowercase Letters</td>
|
- |
|
361 |
<td class="txtCenter">Flat</td>
|
- |
|
362 |
<td class="txtCenter italic">-(n*2)</td>
|
414 |
$msg = '<font color=red><b>'.$R_form_result2.'</b></font>';
|
363 |
<td><div id="nConsecAlphaLC" class="box"> </div></td>
|
- |
|
364 |
<td><div id="nConsecAlphaLCBonus" class="boxMinus"> </div></td>
|
- |
|
365 |
</tr>
|
415 |
}
|
366 |
<tr>
|
- |
|
367 |
<td><div id="div_nConsecNumber" class="pass"> </div></td>
|
- |
|
368 |
<td>Consecutive Numbers</td>
|
- |
|
369 |
<td class="txtCenter">Flat</td>
|
- |
|
370 |
<td class="txtCenter italic">-(n*2)</td>
|
- |
|
371 |
<td><div id="nConsecNumber" class="box"> </div></td>
|
- |
|
372 |
<td><div id="nConsecNumberBonus" class="boxMinus"> </div></td>
|
- |
|
373 |
</tr>
|
416 |
else
|
374 |
<tr>
|
- |
|
375 |
<td><div id="div_nSeqAlpha" class="pass"> </div></td>
|
- |
|
376 |
<td>Sequential Letters (3+)</td>
|
- |
|
377 |
<td class="txtCenter">Flat</td>
|
- |
|
378 |
<td class="txtCenter italic">-(n*3)</td>
|
417 |
echo "<b>Could not open encryption library file</b><br>\n";
|
379 |
<td><div id="nSeqAlpha" class="box"> </div></td>
|
- |
|
380 |
<td><div id="nSeqAlphaBonus" class="boxMinus"> </div></td>
|
- |
|
381 |
</tr>
|
418 |
}
|
382 |
<tr>
|
- |
|
383 |
<td><div id="div_nSeqNumber" class="pass"> </div></td>
|
- |
|
384 |
<td>Sequential Numbers (3+)</td>
|
- |
|
385 |
<td class="txtCenter">Flat</td>
|
- |
|
386 |
<td class="txtCenter italic">-(n*3)</td>
|
- |
|
387 |
<td><div id="nSeqNumber" class="box"> </div></td>
|
- |
|
388 |
<td><div id="nSeqNumberBonus" class="boxMinus"> </div></td>
|
- |
|
389 |
</tr>
|
419 |
}
|
390 |
<tr>
|
- |
|
391 |
<td><div id="div_nSeqSymbol" class="pass"> </div></td>
|
- |
|
392 |
<td>Sequential Symbols (3+)</td>
|
420 |
echo "<span align=center>$msg</span>\n";
|
393 |
<td class="txtCenter">Flat</td>
|
- |
|
394 |
<td class="txtCenter italic">-(n*3)</td>
|
- |
|
395 |
<td><div id="nSeqSymbol" class="box"> </div></td>
|
- |
|
396 |
<td><div id="nSeqSymbolBonus" class="boxMinus"> </div></td>
|
- |
|
397 |
</tr>
|
- |
|
398 |
<tr>
|
- |
|
399 |
<th colspan="6">Legend</th>
|
- |
|
400 |
</tr>
|
- |
|
401 |
<tr>
|
- |
|
402 |
<td colspan="6">
|
- |
|
403 |
<ul id="listLegend">
|
- |
|
404 |
<li><div class="exceed imgLegend"> </div><span class="bold">Exceptional:</span> Exceeds minimum standards. Additional bonuses are applied.</li>
|
- |
|
405 |
<li><div class="pass imgLegend"> </div><span class="bold">Sufficient:</span> Meets minimum standards. Additional bonuses are applied.</li>
|
- |
|
406 |
<li><div class="warn imgLegend"> </div><span class="bold">Warning:</span> Advisory against employing bad practices. Overall score is reduced.</li>
|
- |
|
407 |
<li><div class="fail imgLegend"> </div><span class="bold">Failure:</span> Does not meet the minimum standards. Overall score is reduced.</li>
|
- |
|
408 |
</ul>
|
- |
|
409 |
</td>
|
- |
|
410 |
</tr>
|
- |
|
411 |
</table>
|
- |
|
412 |
<table id="tablePwdNotes" cellpadding="5" cellspacing="1" border="0">
|
421 |
}
|
413 |
<tr>
|
- |
|
414 |
<th>Quick Footnotes</th>
|
- |
|
415 |
</tr>
|
422 |
}
|
416 |
<tr>
|
- |
|
417 |
<td>
|
- |
|
418 |
• <strong>Flat:</strong> Rates that add/remove in non-changing increments.<br>
|
- |
|
419 |
• <strong>Incr:</strong> Rates that add/remove in adjusting increments.<br>
|
- |
|
420 |
• <strong>Cond:</strong> Rates that add/remove depending on additional factors.<br>
|
- |
|
421 |
• <strong>Comp:</strong> Rates that are too complex to summarize. See source code for details.<br>
|
- |
|
422 |
• <strong>n:</strong> Refers to the total number of occurrences.<br>
|
- |
|
423 |
• <strong>len:</strong> Refers to the total password length.<br>
|
- |
|
424 |
• Additional bonus scores are given for increased character variety.<br>
|
- |
|
425 |
• Final score is a cumulative result of all bonuses minus deductions.<br>
|
- |
|
426 |
• Final score is capped with a minimum of 0 and a maximum of 100.<br>
|
- |
|
427 |
• Score and Complexity ratings are not conditional on meeting minimum requirements.<br>
|
- |
|
428 |
</td>
|
- |
|
429 |
</tr>
|
- |
|
430 |
</table>
|
423 |
?>
|
431 |
</div>
|
424 |
</body>
|
432 |
</body>
|
425 |
</html>
|
433 |
</html>
|
426 |
|
- |
|