Bug report: ExtractIPAddresses function IPv6 matches incorrectly when multiple IPs in one-line
- Dominant language
- JavaScript
- Stars
- 35.8k
- Forks
- 4.1k
- Avg merge
- 2d 26m
- Merged PRs (30d)
- 33
Description
**Describe the bug**
The original IPv6 regex code in ExtractIPAddresses only worked fine when it matched the whole one-line text, if it has multiple IPs in one line, it will break sometimes.
**To Reproduce**
[https://gchq.github.io/CyberChef/#recipe=Extract_IP_addresses(false,true,false,false,false,false)&input=MjAwMTowZGI4OjAwMDE6MDAwMDowMDAwOjBhYjk6QzBBODowMTAyIGNhbiBiZSBjb21wcmVzc2VkIGFzIGZvbGxvd3M6IDIwMDE6ZGI4OjE6OmFiOTpDMEE4OjEwMi4](https://gchq.github.io/CyberChef/#recipe=Extract_IP_addresses(false,true,false,false,false,false)&input=MjAwMTowZGI4OjAwMDE6MDAwMDowMDAwOjBhYjk6QzBBODowMTAyIGNhbiBiZSBjb21wcmVzc2VkIGFzIGZvbGxvd3M6IDIwMDE6ZGI4OjE6OmFiOTpDMEE4OjEwMi4)
**Expected behaviour**
When multiple IP in one-line, it can be matched correctly.
**Screenshots**

**Additional context**
See #1661, fix this issue may need to revert this pull request.
Contributor guide
Research direction
Reproduce the linked CyberChef recipe and inspect ExtractIPAddresses, focusing on IPv6 matching when two addresses share one line. Compare the behavior with the context in #1661 and verify that the expected result returns each IP correctly without breaking the compressed form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100