fix: Joomla update server — element names, platform gating, domain race #638
Reference in New Issue
Block a user
Delete Branch "fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Four fixes for the Joomla update server system, plus review-driven improvements.
1. Element name derivation (#635)
AutoElementName()plg_prefix for plugins2. Changelog element mismatch
updates.xmlpriority)3. Platform gating
joomla/both/unset instead of blacklisting onlydolibarrctx.Datavalue tostringfor safety4. Domain auto-association race condition
db.WithTxfor atomic count+insert (prevents exceeding MaxSites)IsDomainKnownForKey,updateDomainRestriction)Fixes #635
Review fixes: - Propagate updateDomainRestriction error in grace-period path instead of silently discarding it (was same bug class as the TOCTOU fix) - Propagate IsDomainKnownForKey error inside transaction — discarding it defeated the atomicity guarantee - Wrap updateDomainRestriction error with context message - Use boolean flags for changelog manifest fallback instead of fragile sentinel comparison against strings.ToLower(repo.Name) - Type-assert ctx.Data["RepoUpdatePlatform"] to string instead of comparing interface{} values - Use log.Warn instead of log.Error for manifest fallback (intentional degradation, not a failure) - Clarify comments: doc comment scope, hyphen removal wording