Skip to content

C#: Make web.config match case insensitive (with change note) #20065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2025

Conversation

smowton
Copy link
Contributor

@smowton smowton commented Jul 16, 2025

Variant of #20061 with a change note

@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 08:07
@smowton smowton requested a review from a team as a code owner July 16, 2025 08:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the C# CodeQL library to make web.config file matching case insensitive. Previously, only files with exact case matches (e.g., "Web.config") were recognized, but now files with any case variation (e.g., "web.config", "WEB.CONFIG") will be detected.

  • Modifies web.config file detection to use case-insensitive matching
  • Updates both standard web.config and web.release.config file patterns
  • Adds a change note documenting the fix and its impact on existing queries

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
csharp/ql/src/change-notes/2025-07-16-web-config.md Documents the case insensitive matching fix and query impact
csharp/ql/lib/semmle/code/asp/WebConfig.qll Implements case insensitive file name matching using toLowerCase()

Copy link
Contributor

@michaelnebel michaelnebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent - thank you!

@smowton smowton merged commit d6a3b2e into github:main Jul 16, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants