[wp-trac] [WordPress Trac] #21622: Validate or sandbox theme file edits before saving them (as is done for plugins)
WordPress Trac
noreply at wordpress.org
Sat Sep 23 12:39:13 UTC 2017
#21622: Validate or sandbox theme file edits before saving them (as is done for
plugins)
--------------------------------------+-----------------------------
Reporter: eschwartz93 | Owner:
Type: enhancement | Status: new
Priority: high | Milestone: 4.9
Component: Themes | Version: 2.7.1
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses: administration
--------------------------------------+-----------------------------
Comment (by azaozz):
Replying to [comment:13 westonruter]:
This sounds pretty good, we've chatted a few times about the best ways to
test for PHP fatals.
> WordPress issues an HTTP request back to itself as the authenticated
user to see if the theme/plugin editor screen continues to load
successfully. That's key, to be able to make an authenticated request back
to the admin...
Right. As the original (main) request was done with the proper credentials
(cookies), they can be passed to this request as well. If this comes
through without errors, it will have to be repeated simulating a front-end
request (can be without credentials) to fully test "everything". If a
theme template was edited it's preferably to be tested too.
There are also some possible variations. One would be to temporarily set
the theme to the fallback theme only for the authenticated user while
accessing wp-admin and saving an edited file. Then the changes can be
test-loaded without breaking wp-admin access. The same could work for
plugins too: while an edited plugin file is being saved, the plugin can be
temporarily disabled only for the authenticated user and only when
accessing wp-admin.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/21622#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list