Distributor: Notice in Wordpress header while debug mode is on.

Created on 22 Dec 2020  ·  5Comments  ·  Source: 10up/distributor

Hi

I first like to congratulate to fix the notices of REST API in the WP header. However, I still find one REST API error in the Header with the latest release 1.6.1 and check the code for under development 1.6.2 and that bug yet needs to be fixed

Notice: register_rest_route was called incorrectly. The REST API route definition for 2fa/v1/test-basic-authorization-header is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

While debugging further it seems to be an issue in the dependency plugin used for application-passwords in composer.json in the file /plugins/distributor/vendor/georgestephanis/application-passwords/class.application-passwords.php online no 116 register_rest_route functions not updated array parameter 'permission_callback' => '__return_true', While digging further check the version used in our plugin composer.json is 0.1.1 and the new version is now available of application passwords is 0.1.2 in which mention bug seems to be fixed.

https://github.com/WordPress/application-passwords

image

Issues fixed in the latest version of the application passwords.

image

Please let us know once the application password version is bumped up in the upcoming version of our plugin.

Regards,
Vimal Agarwal
Tech Lead - Asentech

bug dependencies help wanted

Most helpful comment

@jeffpaul Yes your summarizing is correct. Bumping the Application Passwords Version that is bundled with Distributor will helps to resolve the PHP notice.

I have tested it on my local and its works well and fixed the notices.

All 5 comments

@vimalagarwalasentech am I summarizing your concern here that we should bump the version of the Application Passwords plugin bundled with Distributor to help resolve a PHP notice?

@jeffpaul Yes your summarizing is correct. Bumping the Application Passwords Version that is bundled with Distributor will helps to resolve the PHP notice.

I have tested it on my local and its works well and fixed the notices.

@dinhtungdu do you feel this is low enough risk to bump as part of the 1.6.2 release we're working on to target the handling of App Pwds bundled in WP 5.6?

Curious has there been any movement on this issue?

@mikelking we're working through testing various scenarios but are targeting a 1.6.2 release to address any issues with WP 5.6 and Application Passwords. If you're seeing any additional issues with those two items, please call them out so we can attempt to address them within 1.6.2... thanks!

Was this page helpful?
0 / 5 - 0 ratings