[wp-trac] [WordPress Trac] #55796: SHORTINIT requires rest-api.php via rest_cookie_collect_status() via wp_get_current_user()
WordPress Trac
noreply at wordpress.org
Tue May 24 06:09:11 UTC 2022
#55796: SHORTINIT requires rest-api.php via rest_cookie_collect_status() via
wp_get_current_user()
-----------------------------------+------------------------------
Reporter: johnjamesjacoby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Application Passwords | Version: 2.0
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: rest-api
-----------------------------------+------------------------------
Comment (by johnjamesjacoby):
> Would it work to move all of the REST API related hooks (...)
Yes; that approach would circumvent this specific incongruity in a nice
enough way.
Tangentially, because `SHORTINIT` entitles anyone to kinda just load
whatever however, I think we both have the same hunch that other core
features will go similarly haywire if their files aren't pulled in and
their functions are missing but they are still hooked in via `default-
filters.php`.
Some I found:
* `kses_init` > `set_current_user` > `wp->init()`
* `_post_format_request` > `request` > `wp->parse_request()`
* `_close_comments_for_old_posts` > `the_posts` > `wp->query_posts()`
...and I guess I do not think it is a great pattern for KSES, Post
Formats, or Comments to follow – having their own respective
`-filters.php` files – but because it's all gotten a bit jumbled, maybe?
🤔
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55796#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list