Skip to content
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

Merged
merged 9 commits into from
Oct 7, 2022
Merged

Add PHP8 linter and fix linter issues #465

merged 9 commits into from
Oct 7, 2022

Conversation

kasparsd
Copy link
Collaborator

@kasparsd kasparsd commented Oct 7, 2022

@@ -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() ); ?>
Copy link
Collaborator Author

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thsnks

@@ -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>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a class to target the label for the method selector to avoid generic label styles leaking. This looks good now:

methods

@kasparsd kasparsd merged commit 989dae9 into master Oct 7, 2022
@kasparsd kasparsd deleted the fix/merges branch October 7, 2022 12:36
@jeffpaul jeffpaul added this to the 0.8.0 milestone Oct 7, 2022
@jeffpaul jeffpaul modified the milestones: 0.8.0, 0.7.3 Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants