Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ If this configuration may be used in production, remove the <code>directoryBrows
<example>

<p>
The following example shows the <code>directoryBrowse</code> <code>enable</code> attribute set to true in a <code>Web.config</code> file for ASP.NET:
The following example shows the <code>directoryBrowse</code> <code>enabled</code> attribute set to true in a <code>Web.config</code> file for ASP.NET:
</p>

<sample src="Web.config.bad" />

<p>
To fix this problem, the <code>enable</code> attribute should be set to <code>false</code>, or the <code>directoryBrowse</code> element should be removed completely:
To fix this problem, the <code>enabled</code> attribute should be set to <code>false</code>, or the <code>directoryBrowse</code> element should be removed completely:
</p>

<sample src="Web.config.good" />
Expand All @@ -36,8 +36,8 @@ To fix this problem, the <code>enable</code> attribute should be set to <code>fa
<references>

<li>
MSDN:
<a href="https://msdn.microsoft.com/en-us/library/ms691327(v=vs.90).aspx">directoryBrowse element</a>.
Microsoft Learn:
<a href="https://learn.microsoft.com/en-us/iis/configuration/system.webserver/directorybrowse#attributes">directoryBrowse element</a>.
</li>


Expand Down
6 changes: 3 additions & 3 deletions csharp/ql/src/Security Features/CWE-548/Web.config.bad
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<directoryBrowse enable="true"/>
<directoryBrowse enabled="true"/>
...
</system.web>
</configuration>
</system.webServer>
</configuration>
6 changes: 3 additions & 3 deletions csharp/ql/src/Security Features/CWE-548/Web.config.good
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<directoryBrowse enable="false"/>
<directoryBrowse enabled="false"/>
...
</system.web>
</configuration>
</system.webServer>
</configuration>
Loading