[wp-trac] [WordPress Trac] #42609: Regression: WordPress 4.9 theme editor cannot edit files when running on a Windows based server (was: Regression: WordPress 4.9 plugin/theme editor cannot edit files when running on a Windows based server)

WordPress Trac noreply at wordpress.org
Fri Nov 24 04:36:56 UTC 2017


#42609: Regression: WordPress 4.9 theme editor cannot edit files when running on a
Windows based server
--------------------------------------------------+--------------------
 Reporter:  Otto42                                |       Owner:
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  4.9.1
Component:  Editor                                |     Version:  4.9
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch 2nd-opinion good-first-bug  |     Focuses:
--------------------------------------------------+--------------------

Comment (by dd32):

 No sooner than I post that, I've duplicated it - It only affects the theme
 editor, plugins are not affected.

 The issue in the Theme editor is that we're not actually comparing the no-
 path variants which are used in the source, it's that we're using
 `validate_file( $real_file, $allowed_files )` which is using full paths,
 not relative ones, so even though `validate_file()` passes earlier on
 likes 357/404 it'll fail when it gets to the "Check that this file exists
 within the theme" check.

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


More information about the wp-trac mailing list