feat: implement registering error callbacks#47
Merged
Conversation
Member
Member
|
I will take a look at doing e2e with begin when back. |
2aa538e to
90d2c84
Compare
Signed-off-by: William Zhang <wtzhang23@gmail.com>
90d2c84 to
43d2240
Compare
fzipi
reviewed
Dec 23, 2025
| case types.RuleSeverityDebug: | ||
| return C.CORAZA_SEVERITY_DEBUG | ||
| } | ||
| // Unknown severity, return the highest severity so user can be aware of the issue |
Member
There was a problem hiding this comment.
Why not adding an UNKNOWN or UNDEFINED option to the enum, and return it?
Signed-off-by: William Zhang <wtzhang23@gmail.com>
Contributor
Author
|
Integrated my hack project with the new changes made the last few days which runs the ftw suite and a simple e2e test (PR with test run). Thanks for reviewing all the PRs I created. Happy holidays! |
Member
|
We have this e2e test suite you can use
https://github.com/corazawaf/coraza/blob/main/http/e2e/cmd/httpe2e/main.go
…On Tue, Dec 23, 2025 at 6:50 PM William T Zhang ***@***.***> wrote:
*wtzhang23* left a comment (corazawaf/libcoraza#47)
<#47 (comment)>
Integrated my hack project with the new changes made the last few days
which runs the ftw suite and a simple e2e test (PR
<wtzhang23/coraza-rs#36> with test run).
Thanks for reviewing all the PRs I created. Happy holidays!
—
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXOYAUTHRTHGPJGQRZQBMT4DF6FTAVCNFSM6AAAAACPZ3OH7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOBXGQ3TMMRZHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Contributor
Author
|
I think I actually use that in my e2e tests |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #46.
This introduces registering the error callback with the following api:
coraza_matched_rule_twill support two accessors, one for severity and one for actually retrieving the error log. TBD: determine other important accessors that should be exposed.Centralizing the header is needed due to cgo linking errors as log.go gets more complicated; make coraza.go handle most of the exporting symbols instead.