| @@ -66,12 +66,14 @@ | ||
| 66 | 66 | * |
| 67 | 67 | * @return bool |
| 68 | 68 | */ |
| 69 | 69 | public function is_active(): bool { |
| 70 | - return (bool) apply_filters( | |
| 70 | + $enable = apply_filters( | |
| 71 | 71 | 'wd_strong_password_enable', |
| 72 | 72 | $this->enabled && count( $this->user_roles ) > 0 |
| 73 | 73 | ); |
| 74 | + | |
| 75 | + return is_bool( $enable ) ? $enable : (bool) $enable; | |
| 74 | 76 | } |
| 75 | 77 | |
| 76 | 78 | /** |
| 77 | 79 | * Initializes the object before loading. |
| @@ -116,9 +118,9 @@ | ||
| 116 | 118 | /** |
| 117 | 119 | * Get localized default message. |
| 118 | 120 | */ |
| 119 | 121 | protected function get_default_message(): string { |
| 120 | - return __( | |
| 122 | + return esc_html__( | |
| 121 | 123 | "You are required to change your password because your password doesn't meet the strong password guidelines set by the administrator.", |
| 122 | 124 | 'defender-security' |
| 123 | 125 | ); |
| 124 | 126 | } |