Skip to content

Commit c104b45

Browse files
committed
Update number of 'before' and 'after' bytes
1 parent 28a9ad8 commit c104b45

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/content/docs/waf/managed-rules/payload-logging/decrypt-in-logs.mdx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Matched payload information includes the specific string that triggered a rule,
2727

2828
Once you decrypt its value, the `encrypted_matched_data` property of the `Metadata` field in Logpush has a structure similar to the following:
2929

30-
```jsonc
30+
```json
3131
{
3232
// for fields with only one match (such as URI or user agent fields):
3333
"<match_location>": {
@@ -37,13 +37,21 @@ Once you decrypt its value, the `encrypted_matched_data` property of the `Metada
3737
},
3838
// for fields with possible multiple matches (such as form, header, or body fields):
3939
"<match_location>": [
40-
{ "before": "<text_before_match_1>", "content": "<matched_text_1>", "after": "<text_after_match_1>" },
41-
{ "before": "<text_before_match_2>", "content": "<matched_text_2>", "after": "<text_after_match_2>" }
40+
{
41+
"before": "<text_before_match_1>",
42+
"content": "<matched_text_1>",
43+
"after": "<text_after_match_1>"
44+
},
45+
{
46+
"before": "<text_before_match_2>",
47+
"content": "<matched_text_2>",
48+
"after": "<text_after_match_2>"
49+
}
4250
]
4351
}
4452
```
4553

46-
The `before` and `after` properties are optional (there may be no content before/after the matched text) and will contain at most 25 bytes of content appearing before and after the match.
54+
The `before` and `after` properties are optional (there may be no content before/after the matched text) and will contain at most 15 bytes of content appearing before and after the match.
4755

4856
Below are a few examples of payload matches:
4957

@@ -52,15 +60,15 @@ Below are a few examples of payload matches:
5260
"http.request.uri": {
5361
"before": "/admin",
5462
"content": "/.git/",
55-
"after": "config",
63+
"after": "config"
5664
}
5765
}
5866
```
5967

6068
```json title="Header value match"
6169
{
6270
"http.request.headers.values[3]": [
63-
{ "content": "phar://", "after": "example" },
71+
{ "content": "phar://", "after": "example" }
6472
]
6573
}
6674
```
@@ -70,7 +78,7 @@ Below are a few examples of payload matches:
7078
"http.request.body.raw": {
7179
"before": "NY>",
7280
"content": "<!ENTITY xxe SYSTEM \"file:///dev/random\">] > ",
73-
"after": "<foo>&xxe;</foo>",
81+
"after": "<foo>&xxe;</foo>"
7482
}
7583
}
7684
```

0 commit comments

Comments
 (0)