wpdev
|
d040400da8
|
fix(rest): 公開端點加上 show_in_rest 欄位 allowlist(A5/A6)
4 個 permission_callback => '__return_true' 的公開端點先前回傳 hot+cold
全部欄位,未註冊 show_in_rest 的私密欄位隨之外洩(A v3.3.1,CVSS 5.3)。
- Schema_Registry::register() 新增 show_in_rest 預設 true
- 新增 get_rest_visible_hot_columns() / get_rest_visible_cold_keys()
- get_listing() 以 array_intersect_key 過濾,保留 id / post_type,
並提供 wpdo_rest_listing_visible_fields / tmdo_* filter 供調整
- listings_from_zone_a() 同樣以 visible_cols 過濾
unit 379 / integration 398 GREEN
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
|
2026-07-31 05:21:10 +08:00 |
|