diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-11-25 15:04:44 +0900 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-11-25 15:04:44 +0900 |
commit | 9a4407f7a58af8cfe208436152fa32233a5ca0b3 (patch) | |
tree | aeef9137133ab3bc3e0fd545b9b428f17e0286c5 /src/util | |
parent | baa070d19cda046cb0349e85a9a8aabcd9f52661 (diff) | |
download | exchange-9a4407f7a58af8cfe208436152fa32233a5ca0b3.tar.xz |
more strict spec parsers for payto URIs, Web URLs, and AML decision states
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/url.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util/url.c b/src/util/url.c index 1ac197551..73f61dee8 100644 --- a/src/util/url.c +++ b/src/util/url.c @@ -332,4 +332,20 @@ TALER_url_valid_charset (const char *url) } +bool +TALER_is_web_url (const char *url) +{ + if ( (0 != strncasecmp (url, + "https://", + strlen ("https://"))) && + (0 != strncasecmp (url, + "http://", + strlen ("http://"))) ) + return false; + if (! TALER_url_valid_charset (url) ) + return false; + return true; +} + + /* end of url.c */ |