security(sso): apply mapped-domain token policy to admin-bar magic links
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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 foris_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_tokenlets 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()intests/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
- Ngôn ngữ chính
- PHP
- Star
- 219
- Fork
- 88
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Ultimate-Multisite/ultimate-multisite
-
bug origin:interactive status:available
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Ultimate-Multisite/ultimate-multisite#2131 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug hold-for-review no-auto-dispatch origin:interactive status:available
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
Ultimate-Multisite/ultimate-multisite#2140 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement hold-for-review no-auto-dispatch origin:interactive status:available
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Ultimate-Multisite/ultimate-multisite#2137 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: customer site lists stop at 100 sites (BerlinDB default number)Có thể đã có người làm @superdav42 đã nhận hôm nay. Đang mởauto-dispatch bug origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2136 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: My Sites, Limits and Current Membership columns above 3 collapse to one column (missing grid utilities)Có thể đã có người làm @superdav42 đã nhận hôm nay. Đang mởauto-dispatch bug origin:interactive status:in-review tier:standard
Ultimate-Multisite/ultimate-multisite#2134 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Ultimate-Multisite/ultimate-multisite
Issue tương tự
-
35-feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quantum-php/framework#692 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
ajeetraina/awesome-docker-sbx#559 ·
-
PHP 8.6 supportĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Saisie des adressesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
pantaflex44/Tiquettes#116 · 1 bình luận ·