GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Prevent the ANSI appender and %aspnet-request dropping events by FreeAndNil · Pull Request #316 · apache/logging-log4net

Conversation

@FreeAndNil

@FreeAndNil FreeAndNil commented Sep 3, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Both findings let content the application logged make log4net discard the whole
event. That is worse than log injection: the sender chooses what is not
recorded.

  • f029 AnsiColorTerminalAppender. The branch meant for a one-character
    message read message[0] without checking there was one, so an event that
    rendered to nothing threw and AppenderSkeleton swallowed it. The reset codes
    now go at one computed offset, leaving no short-message branch to get wrong.
  • f019 %aspnet-request. Reading HttpRequest.Params runs ASP.NET request
    validation on first access, so a request carrying <script> threw inside the
    layout and the event was discarded. The converter reads through
    HttpRequest.Unvalidated, which keeps the content instead of degrading the
    field to NOT AVAILABLE. The try now also covers the body parse and
    ServerVariables, two further paths that could throw there.

Two changelog-only commits ride along: every 3.5.0 entry now credits the fixer
per CLAUDE.md, and the Ext.Mail and remote-syslog entries cite the findings
behind them. Those touch entries owned by #313, #314 and #315.

Tests: f029 pins all ten line-break branches. f019 adds five, net462 only, so
they run on the Windows leg alone.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
FreeAndNil added a commit that referenced this pull request Sep 3, 2026
@FreeAndNil
stop the aspnet-request converter dropping events with rejected content
60a3c7d
#316

- Reading HttpRequest.Params validates the query string, form and cookies on
  first access, so a request carrying <script> threw inside the layout and
  AppenderSkeleton discarded the whole event: a sender could suppress the log
  record of their own request.
- The converter now reads through HttpRequest.Unvalidated, so the content is
  kept rather than replaced by the not-available marker.
- The try now also covers the body parse and ServerVariables, which throw on an
  oversized body or a lost client. Verified on Windows: with no worker request
  behind it, ServerVariables is empty rather than throwing.
- Five tests, net462 only, so they run on the Windows leg alone. Reverting the
  fix fails exactly the two that assert the content survives.

audit da18b6f-f019
FreeAndNil added a commit that referenced this pull request Sep 3, 2026
@FreeAndNil
stop the ANSI terminal appender dropping empty messages #316
957cb26
- Logging an empty message threw IndexOutOfRangeException: the branch meant for
  a one-character message read message[0] without checking there was one.
- AppenderSkeleton caught it, so the event simply disappeared.
- The reset codes now go at one computed offset, leaving no short-message branch
  to get wrong.
- All ten line-break cases are pinned by test. They carry explicit names because
  dotnet test --filter cannot see them otherwise; CLAUDE.md records why.

audit da18b6f-f029
FreeAndNil added a commit that referenced this pull request Sep 3, 2026
@FreeAndNil
stop the aspnet-request converter dropping events with rejected content
ebacb66
#316

- Reading HttpRequest.Params validates the query string, form and cookies on
  first access, so a request carrying <script> threw inside the layout and
  AppenderSkeleton discarded the whole event: a sender could suppress the log
  record of their own request.
- The converter now reads through HttpRequest.Unvalidated, so the content is
  kept rather than replaced by the not-available marker.
- The try now also covers the body parse and ServerVariables, which throw on an
  oversized body or a lost client. Verified on Windows: with no worker request
  behind it, ServerVariables is empty rather than throwing.
- Five tests, net462 only, so they run on the Windows leg alone. Reverting the
  fix fails exactly the two that assert the content survives.

audit da18b6f-f019
@FreeAndNil
FreeAndNil force-pushed the Feature/316-content-loss branch from 411f7b5 to 5b392b3 Compare September 3, 2026 21:22
FreeAndNil added a commit that referenced this pull request Sep 3, 2026
@FreeAndNil
stop the ANSI terminal appender dropping empty messages #316
da4b4af
- Logging an empty message threw IndexOutOfRangeException: the branch meant for
  a one-character message read message[0] without checking there was one.
- AppenderSkeleton caught it, so the event simply disappeared.
- The reset codes now go at one computed offset, leaving no short-message branch
  to get wrong.
- All ten line-break cases are pinned by test. They carry explicit names because
  dotnet test --filter cannot see them otherwise; CLAUDE.md records why.

audit da18b6f-f029
FreeAndNil added a commit that referenced this pull request Sep 3, 2026
@FreeAndNil
stop the aspnet-request converter dropping events with rejected content
8b44780
#316

- Reading HttpRequest.Params validates the query string, form and cookies on
  first access, so a request carrying <script> threw inside the layout and
  AppenderSkeleton discarded the whole event: a sender could suppress the log
  record of their own request.
- The converter now reads through HttpRequest.Unvalidated, so the content is
  kept rather than replaced by the not-available marker.
- The try now also covers the body parse and ServerVariables, which throw on an
  oversized body or a lost client. Verified on Windows: with no worker request
  behind it, ServerVariables is empty rather than throwing.
- Five tests, net462 only, so they run on the Windows leg alone. Reverting the
  fix fails exactly the two that assert the content survives.

audit da18b6f-f019
@FreeAndNil
FreeAndNil force-pushed the Feature/316-content-loss branch from 5b392b3 to 4c1120c Compare September 3, 2026 21:27
@FreeAndNil FreeAndNil added this to the 3.5.0 milestone Sep 3, 2026
@FreeAndNil FreeAndNil changed the title Feature/316 content loss Prevent the ANSI appender and %aspnet-request dropping events (#316) Sep 3, 2026
@FreeAndNil FreeAndNil changed the title Prevent the ANSI appender and %aspnet-request dropping events (#316) Prevent the ANSI appender and %aspnet-request dropping events Sep 3, 2026
FreeAndNil added 4 commits September 4, 2026 10:08
@FreeAndNil
stop the ANSI terminal appender dropping empty messages #316
d3b8e9b
- Logging an empty message threw IndexOutOfRangeException: the branch meant for
  a one-character message read message[0] without checking there was one.
- AppenderSkeleton caught it, so the event simply disappeared.
- The reset codes now go at one computed offset, leaving no short-message branch
  to get wrong.
- All ten line-break cases are pinned by test. They carry explicit names because
  dotnet test --filter cannot see them otherwise; CLAUDE.md records why.

audit da18b6f-f029
@FreeAndNil
stop the aspnet-request converter dropping events with rejected content
1452034
#316

- Reading HttpRequest.Params validates the query string, form and cookies on
  first access, so a request carrying <script> threw inside the layout and
  AppenderSkeleton discarded the whole event: a sender could suppress the log
  record of their own request.
- The converter now reads through HttpRequest.Unvalidated, so the content is
  kept rather than replaced by the not-available marker.
- The try now also covers the body parse and ServerVariables, which throw on an
  oversized body or a lost client. Verified on Windows: with no worker request
  behind it, ServerVariables is empty rather than throwing.
- Five tests, net462 only, so they run on the Windows leg alone. Reverting the
  fix fails exactly the two that assert the content survives.

audit da18b6f-f019
@FreeAndNil
credit the fixer in every changelog entry
39033a4
CLAUDE.md wants the description to close with both sides, who raised it and who
did the work. Eleven entries named only the audit finding. Nothing but the
attribution changed.
@FreeAndNil
cite the audit findings behind the Ext.Mail and syslog work #314
7de84b7
The Ext.Mail send rework answers f004 and the remote syslog queue and pump work
answers f034, but neither pair named the finding. The other five 314 and 315
entries stay unattributed: they are our own, not audit findings.
@FreeAndNil
FreeAndNil force-pushed the Feature/316-content-loss branch from 4c1120c to 7de84b7 Compare September 4, 2026 08:09
@FreeAndNil
FreeAndNil requested review from fluffynuts and gdziadkiewicz September 4, 2026 08:10
@FreeAndNil
FreeAndNil marked this pull request as ready for review September 4, 2026 08:10
fluffynuts
fluffynuts approved these changes Sep 4, 2026
View reviewed changes
@FreeAndNil
FreeAndNil merged commit a208c53 into master Sep 4, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@FreeAndNil
FreeAndNil deleted the Feature/316-content-loss branch September 4, 2026 11:49
This was referenced Oct 1, 2026
Bump the all-nuget-updates group with 5 updates drmoisan/TaskMaster#962
Closed
Bump the nuget-dependencies group with 13 updates SvenGroot/JumboCore#65
Closed
Bump log4net and 11 others SvenGroot/JumboCore#66
Closed
Bump log4net from 3.4.0 to 3.5.0 loresoft/KickStart#327
Merged
Bump log4net from 3.4.0 to 3.5.0 ParadoxGameConverters/PGCG.commonItems#941
Merged
Bump log4net from 3.3.1 to 3.5.0 bbtsoftware/AzureDevOpsPolicyConfigurator#253
Closed
Bump the dependencies group with 5 updates guibranco/CrispyWaffle#1000
Merged
Bump the nuget-minor-and-patch group with 1 update filmliga66/drive-mapper#16
Merged
Bump log4net from 3.4.0 to 3.5.0 OPCFoundation/UA-EdgeTranslator#143
Merged
This was referenced Nov 12, 2026
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#78
Closed
Bump Crc32.NET and 12 others SvenGroot/JumboCore#79
Closed
Bump log4net from 3.3.2 to 3.5.0 jasonlandreth/GarminR10-BLE-Connector#6
Closed
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5193
Merged
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5194
Merged
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5195
Merged
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5196
Merged
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5197
Merged
DEV: Bump log4net from 3.4.0 to 3.5.0 origam/origam#5198
Merged
Bump log4net from 3.3.0 to 3.5.0 chutch3/kenku#87
Merged
Bump log4net from 2.0.15 to 3.6.0 sg-scale/NETworkManager--2022.12.20.0#5
Open
Bump the minor-version-updates group with 4 updates PxTools/PCAxis.Menu.OracleDatamodelMenu#115
Merged
Bump log4net and 3 others PxTools/PCAxis.Metadata#108
Merged
Bump Crc32.NET and 12 others SvenGroot/JumboCore#80
Closed
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#81
Closed
Bump log4net and 4 others PxTools/PCAxis.Menu.MsSqlDatamodelMenu#114
Merged
Bump log4net and 3 others PxTools/PXWeb.SavedQuery.Oracle#119
Merged
Bump log4net and 4 others PxTools/PCAxis.Core#142
Merged
Bump log4net from 3.3.1 to 3.6.0 bbtsoftware/AzureDevOpsPolicyConfigurator#255
Open
Bump the minor-version-updates group with 4 updates PxTools/PCAxis.Menu#100
Merged
Bump log4net and 3 others PxTools/PCAxis.Query#113
Merged
Bump log4net and PCAxis.Core PxTools/PCAxis.Query#114
Closed
Bump log4net from 2.0.8 to 3.6.0 devsecops-lab-luis/demo-ghas-multilenguaje#27
Open
Dependency (dependabot/nuget): Bump log4net from 3.3.0 to 3.6.0 Nevergoodstudy/NETworkManager-macOS#24
Open
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#82
Open
Bump Crc32.NET and 12 others SvenGroot/JumboCore#83
Open
deps: Bump log4net from 3.3.2 to 3.6.0 OliverRetro/WavePlus#62
Open
Bump log4net from 3.3.1 to 3.6.0 bNobo/needabreak#176
Open
This was referenced Nov 19, 2026
Bump log4net from 3.3.2 to 3.6.0 jasonlandreth/GarminR10-BLE-Connector#7
Open
Bump Crc32.NET and 12 others SvenGroot/JumboCore#84
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fluffynuts fluffynuts fluffynuts approved these changes
@gdziadkiewicz gdziadkiewicz Awaiting requested review from gdziadkiewicz

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.5.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FreeAndNil @fluffynuts
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.