Skip to content

Fix ANCM app_offline.htm notification match using QueryCCH - #68341

Open
aw0lid wants to merge 1 commit into
dotnet:mainfrom
aw0lid:fix/ancm-filewatcher
Open

Fix ANCM app_offline.htm notification match using QueryCCH#68341
aw0lid wants to merge 1 commit into
dotnet:mainfrom
aw0lid:fix/ancm-filewatcher

Conversation

@aw0lid

@aw0lid aw0lid commented Aug 11, 2026

Copy link
Copy Markdown

Fix ANCM app_offline.htm notification match using QueryCCH

Description

Fixes an issue in file watcher where FILE_WATCHER::HandleChangeCompletion compared the buffer capacity (QuerySizeCCH()) instead of the actual string length (QueryCCH()) against the notified filename length. This made the notification-driven app_offline.htm match path unreachable, causing the application to rely solely on the fallback existence check.

Changes

  • Replaced _strFileName.QuerySizeCCH() with _strFileName.QueryCCH() in filewatcher.cpp.
  • Added a test seam (TEST_SetNotificationBuffer) in filewatcher.h under ANCM_TESTING.
  • Added native unit tests covering exact matches and prefix rejections in filewatcher_tests.cpp.
  • Enabled ANCM_TESTING in CommonLibTests.vcxproj.

Fixes #68283

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 11, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @aw0lid. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@aw0lid
aw0lid force-pushed the fix/ancm-filewatcher branch 2 times, most recently from 31fe217 to b92814b Compare August 11, 2026 12:03
@aw0lid
aw0lid force-pushed the fix/ancm-filewatcher branch from b92814b to c21892e Compare August 11, 2026 12:26
@aw0lid
aw0lid marked this pull request as ready for review August 11, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANCM FILE_WATCHER: app_offline.htm notification match compares buffer capacity instead of string length, making the match path unreachable

1 participant