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

Improve logging pattern schema validation #200317

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TinaHeiligers
Copy link
Contributor

Summary

This makes pattern schema validation stricter by avoiding unrestricted matching, enforces realistic timezone constraints, and sets an upper bound to the date format string.

Characteristic Before After
Optional Groups Capturing groups for optional sections. Non-capturing groups for optional sections.
Timezone Validation Allows any characters except }. Restricts to A-Za-z/_+-.
ReDoS Prevention Broad matching with [^}]. Constrained matching for timezone.
Clarity More complex and verbose. Cleaner, more restrictive, and simpler.
Performance Captures unnecessary groups. Limits captures to needed named groups.

@TinaHeiligers TinaHeiligers added release_note:skip Skip the PR/issue when compiling release notes Feature:Logging v9.0.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.17.0 labels Nov 15, 2024
@TinaHeiligers TinaHeiligers requested a review from a team as a code owner November 15, 2024 22:35
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 454.0KB 454.1KB +16.0B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Logging release_note:skip Skip the PR/issue when compiling release notes v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants