Make WordPress Core

Opened 3 years ago

#54161 new defect (bug)

WordPress destroy iis web.config when using "location" config.

Reported by: foxontherock's profile foxontherock Owned by:
Milestone: Awaiting Review Priority: normal
Severity: critical Version: 5.8.1
Component: Rewrite Rules Keywords:
Focuses: Cc:

Description

When wordpress doesn't find rewrite rulres, it tries to add them, and it works correctly.

BUT

If we use the "location" in web.config, that allow config to NOT inherit in sub applications, it crashes web.config.

When web.config looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <rewrite>
        <rules>

...

wordpress thinks that the "system.webserver" is not present, so it append it at the end of the web.config. And, we get a "500 error" because that new edited web.config is invalid.

We fixed it temporary by disabling "write" access to web.config for our app pool, but you should fix it, and correctly find the "rewrite rule" even if it's under the <location> xml path.

Change History (0)

Note: See TracTickets for help on using tickets.