Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

February 2025 release (2.4.8-beta2) #341

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
3 changes: 3 additions & 0 deletions src/_includes/notes/beta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<InlineAlert variant="info" slots="text" />

Available in [2.4.8-beta](https://experienceleague.adobe.com/en/docs/commerce-operations/release/notes/adobe-commerce/2-4-8) only.
4 changes: 4 additions & 0 deletions src/data/navigation/sections/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@ module.exports = [
title: "Cross-site scripting",
path: "/development/security/cross-site-scripting/",
},
{
title: "Data re-encryption",
path: "/development/security/data-encryption/",
},
{
title: "Denial of service (DoS) attacks",
path: "/development/security/denial-of-service-attacks/",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/coding-standards/technical-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class Edit extends Action

2.13. Static methods SHOULD NOT be used.

2.14. Temporal coupling MUST be avoided
2.14. Temporal coupling MUST be avoided.

Example #1:

Expand Down
72 changes: 70 additions & 2 deletions src/pages/development/backward-incompatible-changes/highlights.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,77 @@ keywords:

This page highlights backward-incompatible changes between Adobe Commerce and Magento Open Source releases that have a major impact and require detailed explanation and special instructions to ensure third-party modules continue working. High-level reference information for all backward-incompatible changes in each release is documented in the [reference](reference.md) section.

## 2.4.8-beta
## 2.4.8-beta2

The following major backward-incompatible changes were introduced in the 2.4.8-beta Adobe Commerce and Magento Open Source releases:
The following major backward-incompatible changes were introduced in the 2.4.8-beta2 Adobe Commerce and Magento Open Source releases:

* Upgraded PHP dependency
* Updated Braintree blocks
* Updated default collation for MySQL
* Updated 2FA Duo web SDK
* reCAPTCHA for wishlists

### Upgraded PHP dependency

After upgrading to PHP 8.4, some Adobe Commerce modules and extensions encountered breaking changes. To ensure compatibility with PHP 8.4, these issues needed to be addressed. Consequently, several modules and extensions within Adobe Commerce have been affected.

PHP 8.4 introduces several new features and improvements, but it also brings breaking changes that can cause issues for modules, extensions, and custom code developed for earlier PHP versions. These changes can impact core functionality, third-party integrations, and can result in errors or unexpected behavior within your Adobe Commerce store.

If custom code or modules are in use, they could need to be modified to comply with [PHP 8.4 changes](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated). Review and update the custom code to resolve any deprecated functions or features.

### Updated Braintree blocks

Several blocks in the Braintree module were refactored to simplify maintenance of the presentation layer.

**Action Required:**

This change affects custom code and extensions that use the following Braintree blocks:

* `app/code/PayPal/Braintree/Block/PayPal/Button.php`
* `app/code/PayPal/Braintree/Block/PayPal/ProductPage.php`
* `app/code/PayPal/Braintree/Block/Customer/CardRenderer.php`
* `app/code/PayPal/Braintree/Block/Credit/Calculator/Cart.php`
* `app/code/PayPal/Braintree/Block/Credit/Calculator/Product/View.php`
* `app/code/PayPal/Braintree/Block/Credit/Calculator/Adminhtml/Virtual/Form.php`

The following module is affected by this change:

* paypal/module-braintree-core

### Updated default collation for MySQL

The system now defaults to using `utf8mb4` collation for MySQL, ensuring compatibility with MySQL 8 and future-proofing against the deprecation of `utf8mb3`. Previously, the system defaulted to using the `utf8mb3` collation, which is deprecated in MySQL 8.

No features are affected by this change. This change introduces support for Basic Multilingual Plane (BMP) and supplementary characters and requires a maximum of four bytes per multibyte character.

### Updated 2FA Duo web SDK

This change updates the Duo two-factor authentication implementation in Adobe Commerce to use the latest SDK (Web SDK v4). This upgrade enables merchants to seamlessly transition to using Duo Universal Prompt.

**Action Required:**

Merchants must update their configuration in the Admin settings to include a Client ID and Secret.

The following module is affected by this change:

* [Magento_TwoFactor Auth](https://developer.adobe.com/commerce/php/module-reference/module-two-factor-auth/)

### reCaptcha for wishlists

The `Magento_Wishlist` module includes a form for sharing wishlists by email, which is available in both Adobe Commerce and Magento Open Source. This update enables reCAPTCHA for this form.

Previously, reCAPTCHA was included in the Adobe Commerce security package. This update moves the `ReCaptchaMultiwishlist` module from the Adobe Commerce security package to the Magento Open Source security package and renames it to `ReCaptchaWishlist`. As a result, reCAPTCHA is now available for the wishlist sharing form in Magento Open Source as well.

The system configurations remain unchanged, but are now part of the Magento Open Source security package. The configuration path is **Stores** > **Configuration** > **Security** > **Google reCAPTCHA Storefront** > **Storefront** > **Enable for Wishlist Sharing**.

The following modules are affected by this change:

* Magento_RecaptchaWishlist
* Magento_RecaptchaMultipleWishlist

## 2.4.8-beta1

The following major backward-incompatible changes were introduced in the 2.4.8-beta1 Adobe Commerce and Magento Open Source releases:

* Upgraded `monolog/monolog` dependency
* Updated default value for 2FA OTP window
Expand Down
83 changes: 83 additions & 0 deletions src/pages/development/security/data-encryption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Re-encrypt system and custom fields
description: Learn how to re-encrypt certain encrypted configuration values after rotating an encryption key.
keywords:
- Extensions
- Security
---

import BetaNote from '/src/_includes/notes/beta.md'

# Data re-encryption

<BetaNote />

Adobe Commerce and Magento Open Source provide functionality to re-encrypt certain encrypted system configuration, payment fields, and custom fields. These operations may be necessary after [rotating an encryption key](https://experienceleague.adobe.com/en/docs/commerce-admin/systems/security/encryption-key).

# Default re-encryptors

The default re-encryption configuration provides two re-encryptors:

- **System configuration fields**—`Magento\Config\Model\Data\ReEncryptorList\CoreConfigDataReEncryptor`
- **Payment fields**—`Magento\Sales\Model\Data\ReEncryptorList\SalesOrderPaymentReEncryptor`

You can use the following command to run both re-encryptors after rotating an encryption key.

```bash
bin/magento encryption:data:re-encrypt core_config_data sales_order_payment
```

# Re-encrypting specific table columns

The `Magento\EncryptionKey\Model\Data\ReEncryptorList\ReEncryptor\SimpleHandler` class serves as a base for re-encryptors that simply tries to re-encrypt specific columns in a database table.

Follow these steps to re-encrypt specific columns in your tables and add a custom re-encryptor:

1. Create a virtual type handler for the `Magento\EncryptionKey\Model\Data\ReEncryptorList\ReEncryptor\SimpleHandler` class and provide the table name, primary key, and columns to encrypt as constructor arguments.

```xml
<virtualType name="Vendor\MyModule\Model\Data\ReEncryptorList\MyCustomPaymentEncryptor\Handler" type="Magento\EncryptionKey\Model\Data\ReEncryptorList\ReEncryptor\SimpleHandler">
<arguments>
<argument name="tableName" xsi:type="string">my_custom_payment_table</argument>
<argument name="identifierField" xsi:type="string">entity_id</argument>
<argument name="fieldsToReEncrypt" xsi:type="array">
<item name="cc_number_enc" xsi:type="string">cc_number_enc</item>
</argument>
</arguments>
</virtualType>
```

1. Create a virtual type for the `Magento\EncryptionKey\Model\Data\ReEncryptorList\ReEncryptor` class and inject the handler created in the previous step as a constructor argument.

```xml
<virtualType name="Vendor\MyModule\Model\Data\ReEncryptorList\MyCustomPaymentReEncryptor" type="Magento\EncryptionKey\Model\Data\ReEncryptorList\ReEncryptor">
<arguments>
<argument name="description" xsi:type="string">Re-encrypts 'cc_number_enc' column in the 'my_custom_payment_table' DB table.</argument>
<argument name="handler" xsi:type="object">Vendor\MyModule\Model\Data\ReEncryptorList\MyCustomPaymentEncryptor\Handler</argument>
</arguments>
</virtualType>
```

1. Add the re-encryptor that you created in the previous step to the `Magento\EncryptionKey\Model\Data\ReEncryptorList` class.

```xml
<type name="Magento\EncryptionKey\Model\Data\ReEncryptorList">
<arguments>
<argument name="reEncryptors" xsi:type="array">
<item name="my_custom_payment_reencryptor" xsi:type="object">Vendor\MyModule\Model\Data\ReEncryptorList\MyCustomPaymentReEncryptor</item>
</argument>
</arguments>
</type>
```

You can run the following command to test that the newly created re-encryptor shows up in the list of available encryptors and whether there were any errors.

```bash
bin/magento encryption:data:list-re-encryptors
```

If the previous step was successful, you can run the following command to re-encrypt specific columns in your database table using the re-encryptor.

```bash
bin/magento encryption:data:re-encrypt my_custom_payment_reencryptor
```
2 changes: 1 addition & 1 deletion src/pages/tutorials/backend/create-api-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ It's much easier to cover a GuzzleHttp implementation by [Unit Tests](https://de

## Create a GitHub API integration

In the following example, we're using the [Github API](https://api.github.com/) as a web service and will fetch some data from the `magento/magento2` repository.
In the following example, we're using the Github API `https://api.github.com/` as a web service and will fetch some data from the `magento/magento2` repository.

```php
<?php
Expand Down
Loading