Problem/Motivation

When "Assign an anonymous order to a pre-existing user" (guest_order_assign) is enabled on a checkout flow, a guest order whose email matches an existing account is assigned to that account on checkout completion. The email address is never verified, so anyone who knows a customer's email address can attach orders to that customer's account.

On top of that, the assignment copies the order's profiles (billing, shipping, payment method billing profile) into that account's address book, and they become the default address when the account had none. Guest profiles are always flagged with copy_to_address_book: the checkbox is hidden for anonymous customers but defaults to checked. As a result, the customer can end up with an address they never entered preselected on their next checkout.

This was reported privately to the security team, and it was agreed that it can be handled as public hardening: the option is off by default, can only be enabled by an administrator, and no data from the account is disclosed.

Proposed resolution

  • Stop copying the order's profiles into the address book when an order is assigned through guest_order_assign. The guest_new_account path, and registering on the completion page, keep copying, since the new account is only usable by whoever controls the email address.
  • State in the option's description that the email address isn't verified, and that the addresses entered during checkout aren't copied to the address book.

Remaining tasks

  • Review the MR.
  • Decide whether the guest's payment method should still be reassigned to the existing account (currently unchanged).

User interface changes

Updated description of the "Assign an anonymous order to a pre-existing user" checkout flow option.

API changes

None.

Data model changes

None.

Issue fork commerce-3641227

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jsacksick created an issue. See original summary.

  • jsacksick committed 2de76ae7 on 3.x
    fix: #3641227 Don't copy profiles to the address book when a guest order...
jsacksick’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • jsacksick committed 237ebf2b on 4.x
    fix: #3641227 Don't copy profiles to the address book when a guest order...