security(sso): apply mapped-domain token policy to admin-bar magic links

オープン
#2,125 コメント 5 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@superdav42 がすでに取り組んでいます。

2026年11月20日 から。

  • #2129 @superdav42 による — オープン

評価

この issue はまだ評価されていません。

説明

auto-dispatch origin:interactive status:in-review tier:standard

Problem

Follow-up to GHSA-qh2w-5cww-9wxr (fixed in 2.19.0 by #2119). Admin-bar magic links still send network admins to customer mapped domains with a login token in the URL. Whoever controls the domain's DNS can capture the token and replay it for a network admin session.

An attacker cannot force this: the link needs a nonce-protected click by the admin. But the customer still receives a network-wide credential whenever an admin visits their site this way.

Files

  • inc/sso/class-admin-bar-magic-links.php: around line 184, access is allowed for is_super_admin() || is_user_member_of_blog().
  • inc/sso/class-magic-link.php: verify_user_site_access() (around line 800) also allows any super admin on any site.

Reference pattern

Use the host policy added in #2119, SSO::can_use_cookie_less_sso_token() in inc/sso/class-sso.php:

  • Hosts the network owner controls (network domain, its subdomains, main-site domains): no change.
  • Customer mapped domains: no token for users with is_super_admin() / manage_network. Non-admins must be members of the site.
  • Filter wu_sso_allow_cookie_less_token lets operators relax it.

Options: make that check reusable (public or a shared helper) and apply it when magic links are generated and redeemed. When a network admin targets a customer mapped domain, send them to that domain's login page instead of minting a token.

Verification

  • vendor/bin/phpunit --filter Magic_Link, plus the admin-bar magic-link tests, pass.
  • New test: a super admin requesting a magic link for a subsite with an active mapped domain gets no token. Fixture pattern: create_customer_mapped_site() in tests/WP_Ultimo/SSO/SSO_Coverage_Test.php.
  • Magic links on network subdomains, and for site members, still work.
Files Scope
  • EDIT: inc/sso/class-admin-bar-magic-links.php
  • EDIT: inc/sso/class-magic-link.php
  • EDIT: inc/sso/class-sso.php
  • EDIT: tests/WP_Ultimo/SSO/SSO_Coverage_Test.php

aidevops.sh v3.39.189 plugin for OpenCode

主要言語
PHP
スター
219
フォーク
88
平均マージ
1日 7時間
マージ済み PR(30日)
58

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Ultimate-Multisite/ultimate-multisite のほかの issue

Ultimate-Multisite/ultimate-multisite の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。