Repository navigation
[NO_TASK] Require network authority to change the network license key - #211
Merged
Merged
Conversation
…se key On multisite, any site administrator could send network=true to POST or DELETE /license and replace or remove the key that every site in the network uses. Those requests now also need manage_network_options; site-level key changes and single-site installs are unchanged.
johnhooks
approved these changes
Oct 13, 2026
2 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require network authority to change the network license key on multisite. Any site administrator could send
network=trueto POST or DELETE/liquidweb/harbor/v1/licenseand replace or remove the key every subsite uses; those requests now also needmanage_network_options. Also bumps Harbor to 2.0.2.Ticket: none — found in a whole-codebase review. Needs a ticket or a
NO_TASKdecision.Reproduce (multisite)
POST /wp-json/liquidweb/harbor/v1/licensewith a valid key andnetwork=true.DELETEwithnetwork=truebehaves the same.Site-level key changes and single-site installs are unchanged.
Proof and coverage
Covered by the new
tests/muwpunit/API/REST/V1/License_ControllerTest.php. Against the old controller it fails (200/204 where 403 is expected); with the fix it passes 4/4. muwpunit 17/17 passes. wpunit 935/938 passes; the 3Feature_ResourceTestfailures also fail onmainin this slic stack. PHPStan, phpcs and the PHP 7.4 check are clean. Not yet QA'd in a browser.Changelog entry is in
changelog/;changelog.txtis left for release prep.AI usage: Drafted with Claude Opus 5.5. I reviewed and tested every change — this is my work and I am accountable for it.
Summary by CodeRabbit