Repository navigation
[6.x] Fix crash when the license key file lists uninstalled addons - #15651
Merged
Merged
Conversation
The offline license key file lists every package licensed to the site, including ones that aren't installed. These ended up in the license response and caused AddonLicense to call name() on a null addon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
When using offline license validation, the key file lists every package licensed to the site including ones that are not installed. Those entries were kept in the license response, so
LicenseManager::addons()created anAddonLicensefor an addon that doesn't exist and the Licensing utility crashed:They could also count towards
addonsValid()showing a licensing alert for an addon that isn't installed.This only keeps the key file entries for installed addons. Installed addons missing from the key file are still added as before. Online validation is unaffected, since the Outpost response only covers the installed packages sent in the request.
It also falls back to an empty list when the key file has no
packageskey.Related: #15653