Skip to content

Commit a778ec9

Browse files
Remove U2F (#439)
* Remove U2F * Drop U2F from plugin description as well. * Clear a no longer relevant screenshot. * These directories no longer exist. * Rename screenshot-3.png to screenshot-2.png * Rename screenshot-4.png to screenshot-3.png * Rename screenshot-5.png to screenshot-4.png * Update readme.txt Co-authored-by: Brian <brian@brianhaas.li> * Update readme.txt Co-authored-by: Brian <brian@brianhaas.li> --------- Co-authored-by: Brian <brian@brianhaas.li>
1 parent 74b52ba commit a778ec9

18 files changed

+11
-2674
lines changed

.wordpress-org/screenshot-2.png

-80.5 KB
Loading

.wordpress-org/screenshot-3.png

1.23 KB
Loading

.wordpress-org/screenshot-4.png

5.17 KB
Loading

.wordpress-org/screenshot-5.png

-34.6 KB
Binary file not shown.

class-two-factor-core.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ private static function get_default_providers() {
214214
return array(
215215
'Two_Factor_Email' => TWO_FACTOR_DIR . 'providers/class-two-factor-email.php',
216216
'Two_Factor_Totp' => TWO_FACTOR_DIR . 'providers/class-two-factor-totp.php',
217-
'Two_Factor_FIDO_U2F' => TWO_FACTOR_DIR . 'providers/class-two-factor-fido-u2f.php',
218217
'Two_Factor_Backup_Codes' => TWO_FACTOR_DIR . 'providers/class-two-factor-backup-codes.php',
219218
'Two_Factor_Dummy' => TWO_FACTOR_DIR . 'providers/class-two-factor-dummy.php',
220219
);
@@ -287,18 +286,6 @@ public static function get_providers() {
287286
*/
288287
$providers = apply_filters( 'two_factor_providers', $providers );
289288

290-
// FIDO U2F is PHP 5.3+ only.
291-
if ( isset( $providers['Two_Factor_FIDO_U2F'] ) && version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
292-
unset( $providers['Two_Factor_FIDO_U2F'] );
293-
trigger_error( // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
294-
sprintf(
295-
/* translators: %s: version number */
296-
__( 'FIDO U2F is not available because you are using PHP %s. (Requires 5.3 or greater)', 'two-factor' ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
297-
PHP_VERSION
298-
)
299-
);
300-
}
301-
302289
// Map provider keys to classes so that we can instantiate them.
303290
$providers = self::get_providers_classes( $providers );
304291

@@ -626,7 +613,7 @@ public static function get_available_providers_for_user( $user = null ) {
626613
* if emailed codes is available force it to be on, so that deprecated
627614
* or removed providers don't result in the two-factor requirement being
628615
* removed and 'failing open'.
629-
*
616+
*
630617
* Possible enhancement: add a filter to change the fallback method?
631618
*/
632619
if ( empty( $enabled_providers ) && $user_providers_raw ) {

0 commit comments

Comments
 (0)