WordPress.org

Make WordPress Core

Opened 13 months ago

#40719 new defect (bug)

iis7_add_rewrite_rule and iis7_delete_rewrite_rule create malformed web.config

Reported by: jaendres Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: Administration Keywords:
Focuses: administration Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.