Plugin Directory

Changeset 2416212


Ignore:
Timestamp:
11/10/2020 11:19:40 PM (5 years ago)
Author:
bettersecurity
Message:

Fixed issue with algorithm check failing in PHP 7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • better-passwords/trunk/better-passwords.php

    r2285741 r2416212  
    33Plugin Name:  Better Passwords
    44Description:  Stop use of a bad passwords, including those in the Have I Been Pwned breached password database
    5 Version:      1.7
     5Version:      1.8
    66Author:       Better Security
    77Author URI:   https://bettersecurity.co
     
    6262            $mess = "<img src='" . plugins_url('icon-36x36.png', __FILE__) . "' align='left' style='margin-right:8px'><strong>";
    6363            $mess .= __("Please choose a better password", 'better-pass-text') . "</strong>: ";
    64             $mess .= __("This password has been found in at least", 'better-pass-text') . " <strong>" . $count . "</strong>";
     64            $mess .= __("This password has been found in at least", 'better-pass-text') . " <strong>" . $count . "</strong> ";
    6565            $mess .= __("data breaches.", 'better-pass-text') . "<br>";
    6666            $mess .= __("This means that this password is vulnerable to credential stuffing attacks.", 'better-pass-text') . " <a href='" . esc_url("https://haveibeenpwned.com/Passwords") . "' target='_blank'>";
     
    212212function better_pass_check_algorithm($nam) {
    213213    $alg = (defined($nam) ? constant($nam) : false);
    214   if(is_int($alg)) {
     214  if(is_int($alg) or is_string($alg)) {
    215215    try {
    216216      return !!password_hash('test',$alg);
Note: See TracChangeset for help on using the changeset viewer.