Commit 9b4e69c
authored
Fix ipv6 validation corner cases (#281)
This ports the ipv6 fix from
bufbuild/protovalidate-go#215.
For context see the description on the above PR. The summary is that
this fixes the validation for some corner cases of IPv6 address
validation. Namely:
* Adds a check that an IPv6 address can't begin or end on a single
colon.
* Adds a check to fail-fast on invalid hextets.1 parent dbdecb0 commit 9b4e69c
File tree
2 files changed
+24
-35
lines changed- protovalidate/internal
- tests/conformance
2 files changed
+24
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
| |||
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
669 | 675 | | |
670 | 676 | | |
671 | 677 | | |
| |||
734 | 740 | | |
735 | 741 | | |
736 | 742 | | |
737 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
738 | 748 | | |
739 | 749 | | |
740 | 750 | | |
| |||
746 | 756 | | |
747 | 757 | | |
748 | 758 | | |
749 | | - | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
750 | 762 | | |
751 | 763 | | |
752 | 764 | | |
753 | 765 | | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
758 | 769 | | |
759 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
760 | 773 | | |
761 | | - | |
| 774 | + | |
762 | 775 | | |
763 | | - | |
764 | | - | |
765 | | - | |
| 776 | + | |
766 | 777 | | |
767 | 778 | | |
768 | 779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
0 commit comments