fix #2039 IPv6 regex accepts invalid formats
Fixed the incorrect IPv6 address formats:
BC:e4d5:c:e7b9::%40i0nccymtl9cwfKo.5vaeXLSGRMe:EDh2qs5wkhnPws5xQKqafjfAMm6wGFCJ.bVFsZfb 1dC:0DF8:62D:3AC::%KTatXocjaFVioS0RTNQl4mA.V151o0RSy.JIu-D-D8.d3171ZWsSJ7PK4YjkJCRN0F These addresses are now correctly identified as invalid.
Updated the IPv6 address validation regex to correctly handle and reject invalid IPv6 address formats. The previous regex allowed formats that were not compliant with IPv6 standards. This fix ensures that only valid IPv6 addresses are accepted.
The validation structure is based on the corrected regex from branch #2083, which had merge conflicts that were resolved for accurate validation. This reference ensures that the updated regex conforms to the expected IPv6 address format and resolves the issue with invalid formats.
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [ ] README updated (where applicable)
- [x] Tests written (where applicable)
- [x] References provided in PR (where applicable)