From c4ae15c1dbecc65b99e42e6c355952e576cfafe0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 Aug 2021 19:38:23 +0200 Subject: -strengthen payto validation logic --- src/include/taler_util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/include/taler_util.h') diff --git a/src/include/taler_util.h b/src/include/taler_util.h index ad2f46a45..33c126cbc 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -313,6 +313,7 @@ TALER_payto_get_method (const char *payto_uri); char * TALER_xtalerbank_account_from_payto (const char *payto); + /** * Extract the subject value from the URI parameters. * @@ -323,6 +324,18 @@ TALER_xtalerbank_account_from_payto (const char *payto); char * TALER_payto_get_subject (const char *payto_uri); + +/** + * Check that a payto:// URI is well-formed. + * + * @param payto_uri the URL to check + * @return NULL on success, otherwise an error + * message to be freed by the caller! + */ +char * +TALER_payto_validate (const char *payto_uri); + + /** * Possible values for a binary filter. */ -- cgit v1.2.3