diff --git a/conf/config.inc.php b/conf/config.inc.php
index 8fc191d8..9367fdf9 100644
--- a/conf/config.inc.php
+++ b/conf/config.inc.php
@@ -120,6 +120,9 @@
# above - the form
# below - the form
$pwd_show_policy_pos = "above";
+# Use statically formulated policy
+# instead of dynamically generated one
+#$pwd_static_policy = "conf/policy.inc.html";
# disallow use of the only special character as defined in `$pwd_special_chars` at the beginning and end
$pwd_no_special_at_ends = false;
@@ -222,6 +225,8 @@
$sms_attribute = "mobile";
# Partially hide number
$sms_partially_hide_number = true;
+# Display full name
+$sms_display_full_name = true;
# Send SMS mail to address
$smsmailto = "{sms_attribute}@service.provider.com";
# Subject when sending email to SMTP to SMS provider
diff --git a/index.php b/index.php
index 10a4a40d..c7f26d8c 100644
--- a/index.php
+++ b/index.php
@@ -140,6 +140,7 @@
"pwd_no_reuse" => $pwd_no_reuse,
"pwd_diff_login" => $pwd_diff_login,
"pwd_complexity" => $pwd_complexity,
+ "pwd_static_policy" => $pwd_static_policy,
"use_pwnedpasswords" => $use_pwnedpasswords,
"pwd_no_special_at_ends" => $pwd_no_special_at_ends
);
diff --git a/lib/functions.inc.php b/lib/functions.inc.php
index a3eb0bbf..99a0bd0a 100644
--- a/lib/functions.inc.php
+++ b/lib/functions.inc.php
@@ -177,22 +177,32 @@ function show_policy( $messages, $pwd_policy_config, $result ) {
if ( !preg_match( "/tooshort|toobig|minlower|minupper|mindigit|minspecial|forbiddenchars|sameasold|notcomplex|sameaslogin|pwned|specialatends/" , $result) ) { return; }
}
+ if ( isset( $pwd_static_policy ) ) {
+ $fp = fopen ($pwd_static_policy, 'rb');
+ } else {
+ $fp = FALSE;
+ }
+
# Display bloc
echo "
\n";
echo "
".$messages["policy"]."
\n";
echo "
\n";
- if ( $pwd_min_length ) { echo "- ".$messages["policyminlength"] ." $pwd_min_length
\n"; }
- if ( $pwd_max_length ) { echo "- ".$messages["policymaxlength"] ." $pwd_max_length
\n"; }
- if ( $pwd_min_lower ) { echo "- ".$messages["policyminlower"] ." $pwd_min_lower
\n"; }
- if ( $pwd_min_upper ) { echo "- ".$messages["policyminupper"] ." $pwd_min_upper
\n"; }
- if ( $pwd_min_digit ) { echo "- ".$messages["policymindigit"] ." $pwd_min_digit
\n"; }
- if ( $pwd_min_special ) { echo "- ".$messages["policyminspecial"] ." $pwd_min_special
\n"; }
- if ( $pwd_complexity ) { echo "- ".$messages["policycomplex"] ." $pwd_complexity
\n"; }
- if ( $pwd_forbidden_chars ) { echo "- ".$messages["policyforbiddenchars"] ." $pwd_forbidden_chars
\n"; }
- if ( $pwd_no_reuse ) { echo "- ".$messages["policynoreuse"] ."\n"; }
- if ( $pwd_diff_login ) { echo "
- ".$messages["policydifflogin"] ."\n"; }
- if ( $use_pwnedpasswords ) { echo "
- ".$messages["policypwned"] ."\n"; }
- if ( $pwd_no_special_at_ends ) { echo "
- ".$messages["policyspecialatends"] ."
\n"; }
+ if ($fp) {
+ fpassthru($fp);
+ } else {
+ if ( $pwd_min_length ) { echo "- ".$messages["policyminlength"] ." $pwd_min_length
\n"; }
+ if ( $pwd_max_length ) { echo "- ".$messages["policymaxlength"] ." $pwd_max_length
\n"; }
+ if ( $pwd_min_lower ) { echo "- ".$messages["policyminlower"] ." $pwd_min_lower
\n"; }
+ if ( $pwd_min_upper ) { echo "- ".$messages["policyminupper"] ." $pwd_min_upper
\n"; }
+ if ( $pwd_min_digit ) { echo "- ".$messages["policymindigit"] ." $pwd_min_digit
\n"; }
+ if ( $pwd_min_special ) { echo "- ".$messages["policyminspecial"] ." $pwd_min_special
\n"; }
+ if ( $pwd_complexity ) { echo "- ".$messages["policycomplex"] ." $pwd_complexity
\n"; }
+ if ( $pwd_forbidden_chars ) { echo "- ".$messages["policyforbiddenchars"] ." $pwd_forbidden_chars
\n"; }
+ if ( $pwd_no_reuse ) { echo "- ".$messages["policynoreuse"] ."\n"; }
+ if ( $pwd_diff_login ) { echo "
- ".$messages["policydifflogin"] ."\n"; }
+ if ( $use_pwnedpasswords ) { echo "
- ".$messages["policypwned"] ."\n"; }
+ if ( $pwd_no_special_at_ends ) { echo "
- ".$messages["policyspecialatends"] ."
\n"; }
+ }
echo "
\n";
echo "
\n";
}
diff --git a/pages/sendsms.php b/pages/sendsms.php
index 90597625..5a28dd0c 100644
--- a/pages/sendsms.php
+++ b/pages/sendsms.php
@@ -329,12 +329,14 @@