Skip to content
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

Add log message sanitization for PostgreSQL #5104

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Add log message sanitization for PostgreSQL #5104

merged 3 commits into from
Mar 20, 2024

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Mar 20, 2024

The new LogStringExtensions class provides methods to sanitize log messages, ensuring that null characters are replaced with "\0". These changes prevent issues with PostgreSQL's inability to store null characters in strings, improving log data compatibility with the database.

Fixes #5101

The method ClearCompletionCallbacks in the ActivityExecutionContext was modifying the collection during enumeration, which can lead to issues. Converting to a List before removal ensures safe modification without side effects.
The new LogStringExtensions class provides methods to sanitize log messages, ensuring that null characters are replaced with "\0". These changes prevent issues with PostgreSQL's inability to store null characters in strings, improving log data compatibility with the database.
@sfmskywalker sfmskywalker requested review from a team March 20, 2024 18:26
Refactor LogStringExtensions to LogExtensions and update summary comment for clarity. This change emphasizes the broader application of the extension methods beyond string manipulation, focusing on sanitizing log messages.
@sfmskywalker sfmskywalker merged commit e67a6fe into main Mar 20, 2024
3 checks passed
@sfmskywalker sfmskywalker deleted the issue/5101 branch March 20, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle Null Characters in CRON Expression Parser Log Entries to Avoid Database Errors
1 participant