merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 4feb623b02cfc0df1bc66a909bb97b942982dc71
parent 8a921b19c7289b1cc29b09cfc4fa484bcc0d6a2d
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sat, 11 Jul 2026 21:41:38 +0200

disable support for extensions, messes up badly in combination with allow_letters (is x letter or extension start?) and mobile phone numbers basically do not use extensions

Diffstat:
Msrc/util/validators.c | 8--------
1 file changed, 0 insertions(+), 8 deletions(-)

diff --git a/src/util/validators.c b/src/util/validators.c @@ -155,7 +155,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, * - Variable length national numbers * - Spaces, hyphens, and dots as separators * - Parentheses for area codes - * - Optional extension notation (x, ext, extension) * - Optional letters representing digits (2-9) if allow_letters is true * * Examples: @@ -165,7 +164,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, * +1 (202) 555-0173 * +886 2 2345 6789 * +1-800-CALL-NOW (if allow_letters is true) - * +49-30-12345678x123 * * Pattern breakdown: * ^\+[0-9]{1,3} @@ -183,9 +181,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, * ([-. ]?[0-9A-Z])* * = Digit/letter groups with optional separators * - * ([ ]?(x|ext|extension)[ ]?[0-9]{1,6})? - * = Optional extension - * * $ * = End of string */ @@ -200,7 +195,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, "(" /* National number: alternating digits and separators */ "[-. ]?[0-9]" /* Separator optionally followed by digit */ ")*" - "([ ]?(x|ext|extension)[ ]?[0-9]{1,6})?" /* Optional extension */ "$"; const char *pattern_with_letters = @@ -214,7 +208,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, "(" /* National number: alternating digits/letters and separators */ "[-. ]?[0-9A-Z]" /* Separator optionally followed by digit or letter */ ")*" - "([ ]?(x|ext|extension)[ ]?[0-9]{1,6})?" /* Optional extension */ "$"; const char *pattern = allow_letters @@ -288,7 +281,6 @@ TALER_MERCHANT_phone_validate_normalize (const char *phone, *out++ = digit; } /* Skip separators, parentheses, and spaces */ - /* Skip 'x', 'ext', 'extension' keywords and their extension digits */ } *out = '\0'; /* redundant, but helps analyzers... */ return normalized;