-
Notifications
You must be signed in to change notification settings - Fork 499
Driver specific template escaping #4666
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
alltilla
merged 22 commits into
syslog-ng:master
from
bazsi:driver-specific-template-escaping
Oct 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a859450
light: move stringify outside of the SyslogNGConfig class
bazsi 65a2859
light: add support for set()
bazsi 1744b38
light: add support for creating template statements
bazsi 37432b5
light: add testcases to exercise templates
bazsi 59be6b2
cfg-grammar.y: extract template_name_or_content rule
bazsi 9fd3b31
cfg-grammar.y: move template_item rule
bazsi 7f05114
cfg-grammar: eliminate last_template variable
bazsi a11ce5a
cfg-grammar: use lexer context to recognize named templates
bazsi 5a15f0f
template: move template related global logic/variables to separate mo…
bazsi 6a8f7c6
template: move LogTemplateOptions to common_template_typedefs
bazsi 06eeb2e
template: extract log_template_append_elem_value()
bazsi 35ab205
template: extract log_template_append_elem_macro()
bazsi 7b19fc9
template: extract log_template_append_elem_func()
bazsi 1ac5d9c
template: differentiate top-level and embedded template expressions
bazsi bb90c4d
template: add "escape" setting to LogTemplateOptions as well
bazsi d1e9e64
template: perform escaping on the result of functions
bazsi e4b22c2
template: apply escaping to all kinds of LogTemplateElems
bazsi 38ffb93
template: remove escaping support from macro expansion
bazsi ab14167
template: use simple g_string_append_len() instead of result_append()
bazsi 7be4356
template: add support for escape callback through LogTemplateEvalOptions
bazsi b8723c8
light: fix copyright holder
alltilla 2b79680
light: remove duplicate import
alltilla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/env python | ||
| ############################################################################# | ||
| # Copyright (c) 2015-2018 Balabit | ||
| # | ||
| # This program is free software; you can redistribute it and/or modify it | ||
| # under the terms of the GNU General Public License version 2 as published | ||
| # by the Free Software Foundation, or (at your option) any later version. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program; if not, write to the Free Software | ||
| # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| # | ||
| # As an additional exemption you are allowed to compile & link against the | ||
| # OpenSSL libraries as published by the OpenSSL project. See the file | ||
| # COPYING for details. | ||
| # | ||
| ############################################################################# | ||
|
|
||
|
|
||
| def stringify(s): | ||
| return '"' + s.replace('\\', "\\\\").replace('"', '\\"').replace('\n', '\\n') + '"' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.