Skip to content

Commit

Permalink
Make activate key lenght configurable (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
belomaxorka committed Apr 4, 2023
1 parent 3afd4c2 commit 0b35ecc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions library/includes/init_bb.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ function bb_setcookie ($name, $val, $lifetime = COOKIE_PERSIST, $httponly = fals

define('SEARCH_ID_LENGTH', 12);
define('SID_LENGTH', 20);
define('ACTKEY_LENGHT', 12);
define('LOGIN_KEY_LENGTH', 12);
define('USERNAME_MIN_LENGTH', 3);
define('USERNAME_MAX_LENGTH', 25);
Expand Down
4 changes: 2 additions & 2 deletions library/includes/ucp/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
{
if ($bb_cfg['reg_email_activation'])
{
$user_actkey = make_rand_str(12);
$user_actkey = make_rand_str(ACTKEY_LENGHT);
$db_data['user_active'] = 0;
$db_data['user_actkey'] = $user_actkey;
}
Expand Down Expand Up @@ -683,7 +683,7 @@
{
if (!$pr_data['user_active'])
{
$user_actkey = make_rand_str(12);
$user_actkey = make_rand_str(ACTKEY_LENGHT);
$pr_data['user_actkey'] = $user_actkey;
$db_data['user_actkey'] = $user_actkey;

Expand Down
2 changes: 1 addition & 1 deletion library/includes/ucp/sendpasswd.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$username = $row['username'];
$user_id = $row['user_id'];

$user_actkey = make_rand_str(12);
$user_actkey = make_rand_str(ACTKEY_LENGHT);
$user_password = make_rand_str(8);

$sql = "UPDATE " . BB_USERS . "
Expand Down

0 comments on commit 0b35ecc

Please sign in to comment.