aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/ucp/ucp_remind.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 9995c719fb..ddc8ec9f17 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -203,6 +203,7 @@ p a {
<li>[Fix] Preserve preview style on search form (Bug #13205)</li>
<li>[Fix] Place attachment filename in new line in posting editor (Bug #9726)</li>
<li>[Fix] Don't allow caching to occur in the update sequence (Bug #13207)</li>
+ <li>[Fix] Enforce the max password length for automatically generated password created by the password sender (Bug #13181)</li>
</ul>
diff --git a/phpBB/includes/ucp/ucp_remind.php b/phpBB/includes/ucp/ucp_remind.php
index cee36e4417..b761e772f6 100644
--- a/phpBB/includes/ucp/ucp_remind.php
+++ b/phpBB/includes/ucp/ucp_remind.php
@@ -61,7 +61,8 @@ class ucp_remind
$server_url = generate_board_url();
$key_len = 54 - strlen($server_url);
- $key_len = ($key_len < 6) ? 6 : $key_len;
+ $key_len = max(6, $key_len); // we want at least 6
+ $key_len = ($config['max_pass_chars']) ? min($key_len, $config['max_pass_chars']) : $key_len; // we want at most $config['max_pass_chars']
$user_actkey = substr(gen_rand_string(10), 0, $key_len);
$user_password = gen_rand_string(8);