Make activate key lenght configurable (#125)

https://github.com/torrentpier/torrentpier/pull/590
This commit is contained in:
Roman Kelesidis 2023-04-04 15:23:25 +07:00 committed by GitHub
parent 3afd4c2112
commit 0b35ecc152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -307,6 +307,7 @@ define('SHOW_PEERS_FULL', 3);
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);

View File

@ -610,7 +610,7 @@ if ($submit && !$errors)
{
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;
}
@ -683,7 +683,7 @@ if ($submit && !$errors)
{
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;

View File

@ -29,7 +29,7 @@ if (isset($_POST['submit']))
$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 . "