diff options
| author | Mattias EngdegÄrd | 2022-04-11 16:22:38 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-04-11 16:29:24 +0200 |
| commit | 26db1ca80e459a640cc6648fb7f94c873def3ddd (patch) | |
| tree | a369bdcd5d121dd2740b7d9764be2390332e5f58 /test | |
| parent | a715f2fbe70bb4cbb961e82af95e2965030b4513 (diff) | |
| download | emacs-26db1ca80e459a640cc6648fb7f94c873def3ddd.tar.gz emacs-26db1ca80e459a640cc6648fb7f94c873def3ddd.zip | |
Recognise hybrid IPv6/IPv4 addresses in textsec (bug#54624)
* lisp/international/textsec.el (textsec--ipvx-address-p):
Recognise hybrid addresses like "::ffff:129.55.2.201".
Combine to a single regexp and translate to rx.
Remove some regexp ambiguity (relint complaint).
* test/lisp/international/textsec-tests.el (test-suspiction-domain):
Add test cases.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/international/textsec-tests.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lisp/international/textsec-tests.el b/test/lisp/international/textsec-tests.el index 9216d334f87..6b0773dc407 100644 --- a/test/lisp/international/textsec-tests.el +++ b/test/lisp/international/textsec-tests.el | |||
| @@ -126,7 +126,10 @@ | |||
| 126 | (should-not (textsec-domain-suspicious-p | 126 | (should-not (textsec-domain-suspicious-p |
| 127 | "[21a:34aa:c782:3ad2:1bf8:73f8:141:66e8]")) | 127 | "[21a:34aa:c782:3ad2:1bf8:73f8:141:66e8]")) |
| 128 | (should (textsec-domain-suspicious-p | 128 | (should (textsec-domain-suspicious-p |
| 129 | "[21a:34aa:c782:3ad2:1bf8:73f8:141:66e8"))) | 129 | "[21a:34aa:c782:3ad2:1bf8:73f8:141:66e8")) |
| 130 | (should-not (textsec-domain-suspicious-p "138.25.106.12")) | ||
| 131 | (should-not (textsec-domain-suspicious-p "2001:db8::ff00:42:8329")) | ||
| 132 | (should-not (textsec-domain-suspicious-p "::ffff:129.55.2.201"))) | ||
| 130 | 133 | ||
| 131 | (ert-deftest test-suspicious-local () | 134 | (ert-deftest test-suspicious-local () |
| 132 | (should-not (textsec-local-address-suspicious-p "larsi")) | 135 | (should-not (textsec-local-address-suspicious-p "larsi")) |