Commit a087892
dmitrii
Reject trailing content after ']' in bracketed-IPv6 parsing
Addresses review feedback: indexOf(']') accepted malformed values such as
"[::1]foo" (returning the inner IP) because it ignored anything after the
bracket. Require the char after ']' to be end-of-string or ':' (a port),
matching the pre-existing strictness ("[ipv6]" or "[ipv6]:port" only).1 parent d1aaf41 commit a087892
2 files changed
Lines changed: 12 additions & 1 deletion
File tree
- agent_api/src
- main/java/dev/aikido/agent_api/helpers/net
- test/java/helpers
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
239 | 246 | | |
0 commit comments