Let hosts provide the site's admin URL for AJAX requests
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 29
- Fork
- 6
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 76
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 wordpress-mobile/GutenbergKit
-
[Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
wordpress-mobile/GutenbergKit#940 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
wordpress-mobile/GutenbergKit#884 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug Android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
wordpress-mobile/GutenbergKit#847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
wordpress-mobile/GutenbergKit#846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug [Type] Code Quality iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
wordpress-mobile/GutenbergKit#668 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wordpress-mobile/GutenbergKit
Issue tương tự
-
Remove: Tele Azul LogoĐang mởcheck:passed logos:remove
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
intuitem/ciso-assistant-community#5380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
TarteelAI/quranic-universal-library#1111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ryoku type:bug
Độ 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
-
feedback simulation workshop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
githubnext/gh-aw-workshop#6094 ·
Maintainer thường phản hồi trong vòng 1 ngày