[wp-trac] [WordPress Trac] #40719: iis7_add_rewrite_rule and iis7_delete_rewrite_rule create malformed web.config

WordPress Trac noreply at wordpress.org
Wed May 10 19:14:13 UTC 2017


#40719: iis7_add_rewrite_rule and iis7_delete_rewrite_rule create malformed
web.config
----------------------------+-----------------------------
 Reporter:  jaendres        |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  4.7.4
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Running wordpress in azure on version 4.7.4 and i have a custom web config
 utilizing the location directive. The methods iis7_add_rewrite_rule and
 iis7_delete_rewrite_rule do not take into account when these directives
 exist and create a new system.webserver line in the web.config at the
 bottom causing the server to 500 error. This seems to happen even when
 simply deleting a post using the admin console, wp is thinking the
 web.config is wrong and trying to add lines. As an immediate work around i
 have disabled these methods, is there a configuration that will allow me
 to stop wordpress from ever doing this? I dont have the ability to change
 the web.config permissions because its a PAAS implementation. Example
 config:

 <configuration>
     <location path="wp-admin">
         <system.webServer>
             <security>
                 <ipSecurity allowUnlisted="false">
                     <add ipAddress="x.x.x.x" allowed="true" />
                 </ipSecurity>
             </security>
         </system.webServer>
     </location>
     <location>
             <system.webServer>
                 <security>
                      <requestFiltering removeServerHeader="true" />
                  </security>
             </system.webServer>
          </location>
 </configuration>

 This is only a partial sample of the file.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40719>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list