Let hosts provide the site's admin URL for AJAX requests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
Start by reading EditorConfiguration, the code that builds ajaxurl and wp.ajax.settings.url, and the iOS relay's admin-ajax.php matching logic; the issue does not name file paths or tests. Trace how WordPress-iOS and WordPress-Android provide the blog's admin_url and how EditorAuthorizationScope handles origins. Done when both platforms can pass a validated optional admin URL, the page and relay use the same value, authorization includes its origin, and the fallback remains compatible.
索引モデルが issue の本文から書いたものです。
説明
What problem does this address?
GutenbergKit builds ajaxurl and wp.ajax.settings.url from siteURL, which is the site's home URL. When the WordPress address differs from the home URL, admin-ajax.php isn't at that path, so the editor's AJAX calls go to the wrong place. That happens when WordPress is installed in its own directory, or when its address is on another host.
Since #923, the iOS relay adds the site credential to admin-ajax.php only at that same ajaxurl. On these sites, a plugin request that uses its own, correct admin URL reaches the server without the credential. One example is Jetpack's videopressAjax.ajaxUrl, used for the videopress/video block's upload token. That block isn't registered today, and the core Video block's VideoPress uploads use REST, so they aren't affected.
What is your proposed solution?
Add an optional admin URL to EditorConfiguration on iOS and Android:
- Fallback: when it's absent, keep today's behavior,
siteURL+/wp-admin/. Hosts can adopt it independently. - Validation: accept it the way
siteURLis accepted: an absolutehttporhttpsURL with no user name or password. Otherwise use the fallback. - One source: build both the page's
ajaxurland the iOS relay'sadmin-ajax.phpmatch from it, so they can't disagree. - Authorization scope: add the admin URL's origin to
EditorAuthorizationScope, as it already includes the site and API origins. The admin URL can be on another origin than the home URL, for example withFORCE_SSL_ADMINor WordPress on its own host. - Hosts: WordPress-iOS and WordPress-Android supply it from the blog's
admin_urloption.
Open question: should GutenbergKit fall back to the site's REST index (url, the WordPress address) before siteURL, so hosts that don't set it are covered too? That costs an extra request or preload entry. Namespaced sites resolve the index locally, but their home and WordPress addresses match.
- 主要言語
- JavaScript
- スター
- 29
- フォーク
- 6
- 平均マージ
- 2日 1時間
- マージ済み PR(30日)
- 76
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wordpress-mobile/GutenbergKit のほかの issue
-
[Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
wordpress-mobile/GutenbergKit#940 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
wordpress-mobile/GutenbergKit#884 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug Android
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
wordpress-mobile/GutenbergKit#847 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug iOS
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
wordpress-mobile/GutenbergKit#846 ·
メンテナーはふだん 1 日以内に返信
-
[Type] Bug [Type] Code Quality iOS
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
wordpress-mobile/GutenbergKit#668 ·
メンテナーはふだん 1 日以内に返信
wordpress-mobile/GutenbergKit の issue をすべて見る
似ている issue
-
check:passed logos:remove
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
intuitem/ciso-assistant-community#5380 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TarteelAI/quranic-universal-library#1111 ·
メンテナーはふだん 1 日以内に返信
-
area:ryoku type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
feedback simulation workshop
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
githubnext/gh-aw-workshop#6094 ·
メンテナーはふだん 1 日以内に返信