
Mage-OS 4.1.0 – Maintenance Release
· mage-os-team · Releases · 8 min read
Mage-OS Distribution 4.1.0 is now available. This is a maintenance release for the 4.x line.
4.1.0 fixes 22 bugs, two of them security hardening in the core, and updates four bundled add-ons. One of those add-on updates carries a security fix for RMA attachment uploads.
Mage-OS 4.1.0 is built on the same Magento Open Source 2.4.9 base as 4.0.0, with no change to PHP support.
Security
- The admin session ID is regenerated before the authenticated user is stored in the session.
Backend\Model\Auth::login()stored the user beforeregenerateId()ran, andsession_regenerate_id()writes the current data under the old ID before switching, so the pre-login session ID stayed authenticated. (#426) by @lbajsarowicz #[\SensitiveParameter]survives code generation. PHP only redacts a parameter in the frame that declares the attribute, and the generators rebuilt method signatures without it, so secrets still appeared inInterceptorand plugin-chain frames. Interceptors, proxies, the profiler logger and the compiled output ofsetup:di:compilenow carry the attribute through. (#418) by @lbajsarowicz
Other fixes
- Full-page cache is read back for cookieless requests on non-default websites. With
MAGE_RUN_TYPE=websiteorgroup, the current store was compared against the default store view of the default website, so every store outside it added astorevalue to the vary string and no request without anX-Magento-Varycookie could hit. First page views, crawlers, monitoring and cache warmers were all a MISS, and with Varnish they were UNCACHEABLE. (#410) by @DmitryFurs - Configurable product rendering no longer fails with
Call to a member function getAttributeCode() on array. The used-products cache serialised a child’s internal attribute-object cache to JSON, so it came back as an array._cache_instance_product_set_attributesis now left out when saving and discarded when reading, which also recovers payloads already written without a cache flush. (#416) by @pjw345 - The credit memo grids work after a store view is deleted. The sales grid tables have no foreign key to
store, so a deleted store id remained insales_creditmemo_grid, and because that table has nobase_currency_codecolumn every amount column looked the store up and raised “The store that was requested wasn’t found”. (#407) by @max-dernovyi - The customer group stays selected on the admin order form.
AdminOrder\Create::getQuote()refreshes the quote’s customer data on every request, andupdateCustomerData()copied the storedgroup_idover the group chosen for the order, losing its group pricing. (#403) by @RaphaelFakhri - Guest order lookup answers correctly when a search field is absent from the post.
hasPostDataEmptyFields()only required the field the chosenoar_typeneeds, so a post withoutoar_ziporoar_emailreached code that read both without a default and returned HTTP 500. (#413) by @rbouma - A website-scope attribute update reaches every store view of the website.
AbstractResource::_updateAttribute()takes a single-row shortcut that products always hit, which is wrong for website-scope values because those are written to every store view. AffectsaddAttributeUpdate()andsaveAttribute(), used by extensions and imports for partial updates. (#430) by @officialasishkumar - Deleting a website or store group removes its sales sequences.
SequenceRemovalObserverlistens only tostore_delete, which never fires for store views removed by a foreign key cascade, leavingsequence_order_Nand friends and theirsales_sequence_metarows behind. (#409) by @max-dernovyi - An email that fails to render no longer affects the next one. A directive that threw left the shared
FilteringDepthMetertoo deep and theDeferredDirectiveRegistryfilled, so later emails in the same process contained:deferred:<sha256>:and lost their inlined CSS. Store emulation is now also stopped in afinally, so a bad template ID no longer renders the following email for the wrong store. Continues #367 by @Blumm. (#434) by @DavidLambauer - A pending REST invoice stays open and its order stays in payment review. For a deferred capture,
InvoiceOrder::createInvoice()ran after the correct states were set and overwrote them, recomputing the order state with a resolver that does not knowpayment_reviewand marking the invoice paid. The admin path was already correct. Backport of magento/magento2#41923. (#429) by @DavidLambauer - Session managers no longer leak through their shutdown function.
registerShutdown()passed[$this, 'writeClose']toregister_shutdown_function(), which holds a strong reference, keeping every session manager and everything it depends on — cache frontends with their Redis connections, log handlers with their open files — alive for the life of the process. Processes that rebuild the object manager kept one object graph per rebuild. (#432) by @DavidLambauer - Passwords containing a colon work in a basic authorization header.
HTTP\Authentication::getCredentials()split the decoded header on every:, sologin:pass:wo:rdarrived as the passwordpass, which could never log in where PHP does not setPHP_AUTH_PW. RFC 7617 separates on the first colon only. (#427) by @bardrop - Watermark transparency is correct with the ImageMagick adapter.
addSingleWatermark()typed its channel parameter asbool, so the integer channel mask was silently converted totrueand reachedImagick::compositeImage()asCHANNEL_RED. On ImageMagick 7 a watermark’s transparent areas became a solid colour block. Tiled watermarks were unaffected. Backport of magento/magento2#41138 by @sebfie. (#424) by @marcelmtz - The Varnish tracking parameter strip list covers many more parameters. Each value of a marketing parameter created its own cache entry.
_ga,_ke,igshid,ef_id,s_kwcid, the Matomo, Piwik and HubSpot families and around twenty more are now stripped in thevarnish4tovarnish7templates, withIdentifier::getMarketingParameterPatterns()kept in step. Short non-namespaced names such asref,cmandtgare deliberately left alone, since extensions may use them as content parameters. Backport of magento/magento2#40656. (#425) by @lbajsarowicz ModuleList::getOne()reads only the requested module’smodule.xml. It was implemented asgetAll()[$name], so the first call in a request parsed and converted themodule.xmlof every registered module. Port of magento/magento2#41772. (#404) by @jeanmarcos-dev- A product list page parameter of
?p=-1no longer reaches the search engine. Negative values were passed through and OpenSearch rejected the request with[from] parameter cannot be negative. Out-of-range values now return page 1. (#405) by @mvscheidt - A clean install no longer fails applying
UpdateProductUrlKeyBackendModel. The patch ran beforeurl_keyexisted and abortedMagento_Catalog’s data patches withAttribute with ID: "url_key" does not exist. Backport of magento/magento2#40322. (#431) by @DavidLambauer - Select and multiselect validation accepts an option label of
"0". A loose boolean check ongetOptionText()treated the string"0"as not found and rejected a valid option withAttribute X does not contain option with Id Y. (#422) by @lbajsarowicz - Blank
new_from_dateandnew_to_datevalues pass import validation on PHP 8.4 and later. Cherry-picked from upstream so the next merge from2.4-developapplies cleanly. (#408) by @pingiun - Entries lost from the
placeOrderstate skip list have been restored.state-skip-list.phpdefinedplaceOrderandplaceOrder-fromConstructedtwice, and the later keys won, dropping the Elasticsearch client and product data mapper entries. (#455) by @pingiun - Gift cards and other linked products are no longer reported as not salable. The stock indexer now uses grouped links only when finding sibling products. (mageos-inventory#20) by @shaughnlgh
- The minimal edition can complete checkout again.
mage-os/product-minimal-editiondid not requirelaminas/laminas-view, whichlaminas/laminas-i18nonly suggests, soMagento\Framework\Translate\AbstractAdaptercould not load its parent class and quote address validation returned HTTP 500 withClass "Laminas\View\Helper\AbstractHelper" not found. Reported against 4.0.0 by @vseager. (generate-mirror-repo-js#388) by @rhoerr
Bundled add-on updates
mage-os/module-rma2.5.1 → 2.6.1. Carries the attachment fix above. It also adds extension points: anrma_email_send_beforeevent for customising RMA emails, RMA creation exposed as a service contract throughRmaManagementInterface, extension points on the create-request forms, and store view values foris_activeandsort_orderon the lookups.mage-os/module-automatic-translation2.4.0 → 2.4.2. Replaces the abandoned DeepL Composer package and deletes legacy translation config rows after migration.aligent/magento2-pci-4-compatibility1.4.2 → 1.4.3. Fixes exception reporting when disabling inactive admin accounts.mage-os/theme-adminhtml-m1371.3.5 → 1.3.6.
Our foundation
For details on the upstream release, see the Magento Open Source 2.4.9 release notes.
Additionally, as per our release policy, Mage-OS 4.0.0 reaches end of life with this release.
Thanks to everyone who shipped this one
@DavidLambauer, @lbajsarowicz, @pingiun, @max-dernovyi, @officialasishkumar, @DmitryFurs, @pjw345, @RaphaelFakhri, @rbouma, @bardrop, @mvscheidt, @jeanmarcos-dev, @shaughnlgh, @Bashev, @rhoerr, @marcelmtz, @sebfie, @engcom-Charlie and @veloraven.
How to upgrade
Upgrading from an older Mage-OS version
Use composer require-commerce. It also updates the Composer plugins your root composer.json pins to the old release. A plain composer require stops with a conflict on mage-os/composer-dependency-version-audit-plugin.
composer require-commerce mage-os/product-community-edition=4.1.0 --no-update
composer update
bin/magento setup:upgradeNew installations
composer create-project --repository-url=https://repo.mage-os.org/ mage-os/project-community-edition:4.1.0 my-storeMigrating from Adobe Commerce or Magento Open Source
See our migration guide for detailed instructions on switching to Mage-OS.
We hope you enjoy Mage-OS 4.1.0. As always, please report any issues on GitHub and join the conversation on Discord.