Repository navigation
Commit 43b49ef
committed
fix(validation): reject server keys containing newlines
Use the strict \z end-of-string anchor for server key validation so keys
with a trailing newline cannot pass through the $ anchor.
Add regression cases for trailing LF, CRLF, and embedded newlines in
AsyncAPI 2.6.0 and 3.0.0. Escape carriage returns and newlines in
double-quoted YAML keys so the tests preserve these characters for
validation.1 parent 9ebf225 commit 43b49ef
2 files changed
Lines changed: 4 additions & 3 deletions
File tree
- src/ByteBard.AsyncAPI/Validation/Rules
- test/ByteBard.AsyncAPI.Tests/Validation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments