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

Hotfix - basic auth fix #453

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Hotfix - basic auth fix #453

merged 2 commits into from
Jan 17, 2024

Conversation

boonedev
Copy link
Contributor

@boonedev boonedev commented Jan 12, 2024

This PR:

  • Bugfix: changes misnamed js variable from edacp_full_site_scan_app to edacpFullSiteScanApp
  • Adds EDAC\Helpers\is_basic_auth()
  • replaces get_option( 'edac_password_protected') checks with EDAC\Helpers\is_basic_auth()
  • Adds basicAuth to js edac_editor_app
  • Adds auth warning to editor page when user saves a post in free on a site that requires auth

… edacpFullSiteScanApp

Adds EDAC\Helpers\is_basic_auth()
replaces get_option( 'edac_password_protected') checks with EDAC\Helpers\is_basic_auth()
Adds basicAuth to js edac_editor_app
Adds auth warning to editor page when user saves a post in free & site requires auth
edac_check_plugin_active( 'accessibility-checker-pro/accessibility-checker-pro.php' )
) &&
\EDAC\Helpers::is_basic_auth()
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only show the "Whoops! It looks like your website is currently password protected..." message when editing pages if Pro is not valid/active and we've tested that basic auth is in place.

let HEADERS;
if (typeof (edacp_full_site_scan_app) === 'undefined') {
if (typeof (edacpFullSiteScanApp) === 'undefined') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This misnamed variable is the root cause of the issue b/c the user/pass were not being passed so auth failed.



checkApi().then((status) => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're using serverside to test if auth is in place, so no need for this.

@boonedev boonedev changed the title Bugfix: changes misnamed js variable from edacp_full_site_scan_app to… Hotfix - basic auth fix Jan 12, 2024
@boonedev boonedev marked this pull request as ready for review January 12, 2024 18:36
@SteveJonesDev SteveJonesDev merged commit e1d751b into main Jan 17, 2024
7 checks passed
@SteveJonesDev SteveJonesDev deleted the hotfix/basic-auth-fix branch January 17, 2024 17:32
@SteveJonesDev SteveJonesDev added this to the v1.7.1 milestone Jan 17, 2024
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.

2 participants