[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
Thu Sep 21 18:40:33 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:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:  2.7.1
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  administration
-------------------------+------------------------------

Comment (by Clorith):

 My thought is to create a tentative copy of the file being edited (or keep
 the old content in memory), after writing changes we can then check the
 site status and replace the file (overwrite it with the old content)
 within the same running process if there is a failure.

 This would prevent us from needing to copy the entire theme, and would
 possibly be a better approach to the plugin editor sandboxing as well (as
 deactivating the plugin may be detrimental to the site experience, but
 rapidly restoring is a cleaner resolution).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21622#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list