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
Prev Previous commit
Next Next commit
fix: remove the css link to disciple-tools-theme
require the css instead of registering it
  • Loading branch information
squigglybob committed Nov 23, 2023
commit e3e394ced40941eb5e443a0cca23ec2c29b91fc7
3 changes: 2 additions & 1 deletion dt-login/login-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public function __construct() {
}

public function header_style(){
// parent::header_style();
parent::header_style();
?>

<style>
body { background: #f0f0f1; }
.login-remember { float: left; }
Expand Down
10 changes: 4 additions & 6 deletions dt-login/pages/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public function _header(){
}
public function header_style(){
?>

<style>
body {
background: white;
}
<?php require __DIR__ . '/../../dt-assets/build/css/style.min.css' ?>
Copy link
Member

Choose a reason for hiding this comment

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

@squigglybob
this includes ALL of the 30 kB of D.T css in the header.
It is just for this UI, right:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could sift the CSS, for what is needed for this/ write some CSS to make it look like this 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've created a stripped down css for the login page, that has no dependencies on foundation either.

I wasn't able to test the page where you create a new password after receiving the lost password email. 😬
it was taking me to the wp-login new password page instead

</style>

<?php
}
public function _browser_tab_title( $title ){
Expand Down Expand Up @@ -85,9 +85,7 @@ public function _print_scripts(){
}
public function _print_styles(){
// @link /disciple-tools-theme/dt-assets/functions/enqueue-scripts.php
$allowed_css = [
'site-css',
];
$allowed_css = [];

$allowed_css = apply_filters( 'dt_login_allowed_css', $allowed_css );

Expand Down
Loading