Skip to content

Commit

Permalink
Make unique char score configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Sep 2, 2024
1 parent 3b43163 commit c860716
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/org/openpsa/user/accounthelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function check_password_strength(string $password) : bool
}

// score for length & repetition
$score = $this->count_unique_characters($password) * 4;
$score = $this->count_unique_characters($password) * $this->_config->get('unique_character_score');

//check $password with rules
$rules = $this->_config->get_array('password_score_rules');
Expand Down
1 change: 1 addition & 0 deletions lib/org/openpsa/user/config/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ __PASSWORD__',
'max_old_passwords' => 3,
'min_password_length' => 8,
'min_password_score' => 35,
'unique_character_score' => 4,
'password_block_timeframe_min' => 5,
'max_password_attempts' => 5,

Expand Down

0 comments on commit c860716

Please sign in to comment.