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

Fix/dt login security fixes #2277

Merged
Next Next commit
fix: show multisite fields as password fields to hide secrets
  • Loading branch information
squigglybob committed Nov 23, 2023
commit 4c2bb91b8841638ead804a8701bb49e4ecd61cb9
8 changes: 6 additions & 2 deletions dt-core/admin/menu/tabs/tab-sso-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,21 @@ class="nav-tab <?php echo esc_html( ( $tab == $key ) ? 'nav-tab-active' : '' );
<table class="widefat striped">
<tbody>
<?php
$any_multisite_level_args = false;
if ( ! empty( $vars ) ) {
foreach ( $vars as $key => $value ) {
if ( $tab === $value['tab'] ) {
$any_multisite_level_args = is_multisite() && !empty( $value['multisite_level'] );
$this->tab( $value );
}
}
}


?>
<tr>
<td colspan="2">
<button class="button" type="submit">Save</button> <button class="button" type="submit" style="float:right;" name="delete" value="1">Reset</button>
<button class="button" type="submit">Save</button> <button class="button" <?php echo esc_attr( $any_multisite_level_args ? 'disabled' : '' ) ?> type="submit" style="float:right;" name="delete" value="1">Reset</button>
</td>
</tr>
</tbody>
Expand All @@ -151,7 +155,7 @@ public function tab( $args ) {
</td>
<td>
<input
type="text"
type="<?php echo esc_attr( $must_have_super_admin_rights ? 'password' : 'text' ) ?>"
name="<?php echo esc_attr( $args['key'] ) ?>"
value="<?php echo esc_attr( $args['value'] ) ?>"
<?php echo $must_have_super_admin_rights ? 'disabled' : '' ?>
Expand Down