[wp-trac] [WordPress Trac] #51939: Basic Auth staging protections conflicts with App Passwords
WordPress Trac
noreply at wordpress.org
Mon Dec 7 10:19:33 UTC 2020
#51939: Basic Auth staging protections conflicts with App Passwords
-------------------------------------------------+-------------------------
Reporter: TimothyBlynJacobs | Owner:
| TimothyBlynJacobs
Type: defect (bug) | Status: closed
Priority: highest omg bbq | Milestone: 5.6
Component: Application Passwords | Version: 5.6
Severity: blocker | Resolution: fixed
Keywords: has-patch has-unit-tests dev- | Focuses: rest-api
reviewed |
-------------------------------------------------+-------------------------
Comment (by spacedmonkey):
After reviewing this patch, as the maintainer of multisite, I have one
simple recommendation, save the `OPTION_KEY_IN_USE` against the main
network. This can be done like this.
{{{#!php
update_network_option( get_main_network_id(),
WP_Application_Passwords::OPTION_KEY_IN_USE, 1 );
}}}
{{{#!php
return (bool) get_network_option( get_main_network_id(),
self::OPTION_KEY_IN_USE );
}}}
This adds a key benefit, if you are using multi network, then this option
is stored locally on the main network. Using the main network's option as
a global store is a pattern [https://github.com/WordPress/wordpress-
develop/blob/38361be8e641f59041c5177dab70bbb8e3d0f4f7/src/wp-
admin/includes/upgrade.php#L2440-L2445 already found in core].
CC other multisite maintainers @jeremyfelt @johnjamesjacoby @flixos90
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51939#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list