Skip to content

Commit

Permalink
nits: SecRuleUpdateActionById doc (#1185)
Browse files Browse the repository at this point in the history
nits: doc
  • Loading branch information
M4tteoP authored Oct 31, 2024
1 parent 7205791 commit c27bac8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/http-server/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
github.com/corazawaf/coraza/v3 v3.2.1 h1:zBIji4ut9FtFe8lXdqFwXMAkUoDJZ7HsOlEUYWERLI8=
github.com/corazawaf/coraza/v3 v3.2.1/go.mod h1:fVndCGdUHJWl9c26VZPcORQRzUYwMPnRkC6TyTkhbUg=
github.com/corazawaf/libinjection-go v0.2.2 h1:Chzodvb6+NXh6wew5/yhD0Ggioif9ACrQGR4qjTCs1g=
github.com/corazawaf/libinjection-go v0.2.2/go.mod h1:OP4TM7xdJ2skyXqNX1AN1wN5nNZEmJNuWbNPOItn7aw=
github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI=
github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
Expand Down
4 changes: 2 additions & 2 deletions internal/seclang/directives.go
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ func updateTargetBySingleID(id int, variables string, options *DirectiveOptions)
// It has two limitations: it cannot be used to change the ID or phase of a rule.
// Only the actions that can appear only once are overwritten.
// The actions that are allowed to appear multiple times in a list, will be appended to the end of the list.
// The following example demonstrates how `SecAuditEngine` is used:
// The following example demonstrates how `SecRuleUpdateActionById` is used:
// ```apache
// SecRuleUpdateActionById 12345 "deny,status:403"
// ```
Expand All @@ -1067,7 +1067,7 @@ func directiveSecRuleUpdateActionByID(options *DirectiveOptions) error {
if idsOrRangesLen < 2 {
return errors.New("syntax error: SecRuleUpdateActionById id \"ACTION1,ACTION2,...\"")
}
// The last element is expected to be the actions(s)
// The last element is expected to be the action(s)
actions := idsOrRanges[idsOrRangesLen-1]
for _, idOrRange := range idsOrRanges[:idsOrRangesLen-1] {
if idx := strings.Index(idOrRange, "-"); idx == -1 {
Expand Down
2 changes: 0 additions & 2 deletions testing/coreruleset/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I=
github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/corazawaf/coraza-coreruleset/v4 v4.6.0 h1:VGlMw3QMuKaV7XgifPgcqCm66K+HRSdM4d9PRh1nD50=
Expand Down

0 comments on commit c27bac8

Please sign in to comment.