-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PHP8 linter and fix linter issues #465
Conversation
kasparsd
commented
Oct 7, 2022
- Add a Composer script to lint for PHP 8.2 support.
- Add the check to CI, too.
- Fix the CSS linter issues introduced by Add <label> to provider name #387.
@@ -672,7 +672,7 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg | |||
?> | |||
<li> | |||
<a href="<?php echo esc_url( $login_url ); ?>"> | |||
<?php $backup_provider->print_label(); ?> | |||
<?php echo esc_html( $backup_provider->get_label() ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't trust the provider to return the label escaped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thsnks
class-two-factor-core.php
Outdated
@@ -987,8 +987,7 @@ public static function user_two_factor_options( $user ) { | |||
<th scope="row"><input id="enabled-<?php echo esc_attr( $class ); ?>" type="checkbox" name="<?php echo esc_attr( self::ENABLED_PROVIDERS_USER_META_KEY ); ?>[]" value="<?php echo esc_attr( $class ); ?>" <?php checked( in_array( $class, $enabled_providers, true ) ); ?> /></th> | |||
<th scope="row"><input type="radio" name="<?php echo esc_attr( self::PROVIDER_USER_META_KEY ); ?>" value="<?php echo esc_attr( $class ); ?>" <?php checked( $class, $primary_provider_key ); ?> /></th> | |||
<td> | |||
<label for="enabled-<?php echo esc_attr( $class ); ?>"><?php $object->print_label(); ?></label> | |||
|
|||
<label class="two-factor-method-label" for="enabled-<?php echo esc_attr( $class ); ?>"><?php esc_html( $object->get_label() ); ?></label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.