projects/packages/password-checker/src/class-password-checker.php 1 location
|
@@ 151-155 (lines=5) @@
|
| 148 |
|
$entropy_bits = $this->calculate_entropy_bits( $password ); |
| 149 |
|
|
| 150 |
|
// If we have failed the entropy bits test, run the regex tests so we can suggest improvements. |
| 151 |
|
if ( $entropy_bits < $this->minimum_entropy_bits ) { |
| 152 |
|
$results['failed']['entropy_bits'] = $entropy_bits; |
| 153 |
|
// Run the tests. |
| 154 |
|
$results = array_merge( $results, $this->run_tests( $password, $this->get_tests( 'preg_match' ) ) ); |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
return ( array( |
| 158 |
|
'passed' => empty( $results['failed'] ), |
projects/plugins/jetpack/_inc/lib/class.jetpack-password-checker.php 1 location
|
@@ 155-161 (lines=7) @@
|
| 152 |
|
$entropy_bits = $this->calculate_entropy_bits( $this->password ); |
| 153 |
|
|
| 154 |
|
// If we have failed the entropy bits test, run the regex tests so we can suggest improvements. |
| 155 |
|
if ( $entropy_bits < $bits ) { |
| 156 |
|
$results['failed']['entropy_bits'] = $entropy_bits; |
| 157 |
|
$results = array_merge( |
| 158 |
|
$results, |
| 159 |
|
$this->run_tests( $this->list_tests( 'preg_match' ), false ) |
| 160 |
|
); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
return( array( |
| 164 |
|
'passed' => empty( $results['failed'] ), |