From 57a170bcaf6179aeb897c70de22a3c019fbc9fdd Mon Sep 17 00:00:00 2001 From: jalil Date: Thu, 23 Apr 2026 14:16:53 +0200 Subject: [PATCH] Update test vectors for ERC-4361 erratum Reclassify userinfo@ domain messages as negative and update statement character vectors for the printable-ASCII widening. --- vectors/grammar/invalid_chars.json | 30 --------------------------- vectors/grammar/valid_chars.json | 2 +- vectors/parsing/parsing_negative.json | 4 +++- vectors/parsing/parsing_positive.json | 26 ----------------------- 4 files changed, 4 insertions(+), 58 deletions(-) diff --git a/vectors/grammar/invalid_chars.json b/vectors/grammar/invalid_chars.json index e0a8a4e..305a2ad 100644 --- a/vectors/grammar/invalid_chars.json +++ b/vectors/grammar/invalid_chars.json @@ -34,36 +34,6 @@ "input": "~", "answer": false }, - "statement + `": { - "rule": "statement", - "input": "`", - "answer": false - }, - "statement + <": { - "rule": "statement", - "input": "<", - "answer": false - }, - "statement + >": { - "rule": "statement", - "input": ">", - "answer": false - }, - "statement + {": { - "rule": "statement", - "input": "{", - "answer": false - }, - "statement + |": { - "rule": "statement", - "input": "|", - "answer": false - }, - "statement + }": { - "rule": "statement", - "input": "}", - "answer": false - }, "userinfo + /": { "rule": "userinfo", "input": "/", diff --git a/vectors/grammar/valid_chars.json b/vectors/grammar/valid_chars.json index 9e0b62c..b7bca2d 100644 --- a/vectors/grammar/valid_chars.json +++ b/vectors/grammar/valid_chars.json @@ -6,7 +6,7 @@ }, "statement": { "rule": "statement", - "input": ":/?#[]@!$&'()*+,;= abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~", + "input": " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", "answer": true }, "pct-encoded": { diff --git a/vectors/parsing/parsing_negative.json b/vectors/parsing/parsing_negative.json index 12280b6..7b658c8 100644 --- a/vectors/parsing/parsing_negative.json +++ b/vectors/parsing/parsing_negative.json @@ -35,5 +35,7 @@ "address too long": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA49460\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", "address contains non-hex character": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeG4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", "nonce with non-alphanumeric characters": "service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12345_789\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", - "scheme starts with non-ALPHA": "3https://service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login" + "scheme starts with non-ALPHA": "3https://service.org wants you to sign in with your Ethereum account:\n0xe5A12547fe4E872D192E3eCecb76F2Ce1aeA4946\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 12341234\nIssued At: 2022-03-17T12:45:13.610Z\nExpiration Time: 2023-03-17T12:45:13.610Z\nNot Before: 2022-03-17T12:45:13.610Z\nRequest ID: some_id\nResources:\n- https://service.org/login", + "domain is RFC 3986 authority with userinfo": "test@127.0.0.1 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", + "domain is RFC 3986 authority with userinfo and port": "test@127.0.0.1:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z" } diff --git a/vectors/parsing/parsing_positive.json b/vectors/parsing/parsing_positive.json index 5cd8445..4efa64b 100644 --- a/vectors/parsing/parsing_positive.json +++ b/vectors/parsing/parsing_positive.json @@ -68,19 +68,6 @@ "issuedAt": "2021-09-30T16:25:24.000Z" } }, - "domain is RFC 3986 authority with userinfo": { - "message": "test@127.0.0.1 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "test@127.0.0.1", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, "domain is RFC 3986 authority with port": { "message": "127.0.0.1:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", "fields": { @@ -107,19 +94,6 @@ "issuedAt": "2021-09-30T16:25:24.000Z" } }, - "domain is RFC 3986 authority with userinfo and port": { - "message": "test@127.0.0.1:8080 wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\nI accept the ServiceOrg Terms of Service: https://service.org/tos\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", - "fields": { - "domain": "test@127.0.0.1:8080", - "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", - "statement": "I accept the ServiceOrg Terms of Service: https://service.org/tos", - "uri": "https://service.org/login", - "version": "1", - "chainId": 1, - "nonce": "32891757", - "issuedAt": "2021-09-30T16:25:24.000Z" - } - }, "no statement": { "message": "service.org wants you to sign in with your Ethereum account:\n0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n\n\nURI: https://service.org/login\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z", "fields": {