commit 540de83e13a6981f08f10de832bcbdb907d66115 parent 61a7da13c1ad4b8923f56be57b8926991689ec45 Author: Christian Grothoff <christian@grothoff.org> Date: Sun, 29 Dec 2024 23:18:59 +0100 always use full payto URIs Diffstat:
9 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac @@ -4,7 +4,7 @@ # This configure file is in the public domain AC_PREREQ([2.71]) -AC_INIT([anastasis],[0.6.0],[taler-bug@gnu.org]) +AC_INIT([anastasis],[0.6.1],[taler-bug@gnu.org]) AC_CONFIG_SRCDIR([src/backend/anastasis-httpd.c]) AC_CONFIG_HEADERS([anastasis_config.h]) # support for non-recursive builds @@ -187,6 +187,15 @@ AS_CASE([$with_exchange], [LDFLAGS="-L$with_exchange/lib $LDFLAGS" CPPFLAGS="-I$with_exchange/include $CPPFLAGS $POSTGRESQL_CPPFLAGS"]) +AC_CHECK_HEADERS([taler/taler_util.h], + [AC_CHECK_LIB([talerutil], + [TALER_pattern_matches], + [with_exchange=yes], + [AC_MSG_ERROR([libtalerutil too old])])], + [AC_MSG_ERROR([taler/taler_util.h found])], + [#include <taler/platform.h>]) + + CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" LDFLAGS="$LDFLAGS -L/usr/local/lib" diff --git a/src/authorization/anastasis_authorization_plugin_email.c b/src/authorization/anastasis_authorization_plugin_email.c @@ -454,8 +454,8 @@ email_challenge (struct ANASTASIS_AUTHORIZATION_State *as, else len = at - as->email; - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { char *user; diff --git a/src/authorization/anastasis_authorization_plugin_file.c b/src/authorization/anastasis_authorization_plugin_file.c @@ -229,8 +229,8 @@ file_challenge (struct ANASTASIS_AUTHORIZATION_State *as, { struct MHD_Response *resp; - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { resp = TALER_MHD_MAKE_JSON_PACK ( GNUNET_JSON_pack_string ("challenge_type", diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c @@ -440,8 +440,8 @@ iban_challenge (struct ANASTASIS_AUTHORIZATION_State *as, { struct MHD_Response *resp; - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { char subject[64]; diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c @@ -519,8 +519,8 @@ post_challenge (struct ANASTASIS_AUTHORIZATION_State *as, { struct MHD_Response *resp; - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { resp = TALER_MHD_MAKE_JSON_PACK ( GNUNET_JSON_pack_string ("challenge_type", diff --git a/src/authorization/anastasis_authorization_plugin_sms.c b/src/authorization/anastasis_authorization_plugin_sms.c @@ -450,8 +450,8 @@ sms_challenge (struct ANASTASIS_AUTHORIZATION_State *as, else end = &as->phone_number[slen / 2]; - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { resp = TALER_MHD_MAKE_JSON_PACK ( GNUNET_JSON_pack_string ("challenge_type", diff --git a/src/authorization/anastasis_authorization_plugin_totp.c b/src/authorization/anastasis_authorization_plugin_totp.c @@ -284,8 +284,8 @@ totp_solve (struct ANASTASIS_AUTHORIZATION_State *as, struct GNUNET_TIME_Timestamp now; now = GNUNET_TIME_timestamp_get (); - if (TALER_MHD_xmime_matches (mime, - "application/json")) + if (0.0 < TALER_pattern_matches (mime, + "application/json")) { resp = TALER_MHD_MAKE_JSON_PACK ( GNUNET_JSON_pack_uint64 ("code", diff --git a/src/cli/test_reducer.conf b/src/cli/test_reducer.conf @@ -95,7 +95,7 @@ MAX_DEBT = TESTKUDOS:50.0 MAX_DEBT_BANK = TESTKUDOS:100000.0 HTTP_PORT = 18082 SUGGESTED_EXCHANGE = http://localhost:8081/ -SUGGESTED_EXCHANGE_PAYTO = payto://x-taler-bank/localhost/2 +SUGGESTED_EXCHANGE_PAYTO = payto://x-taler-bank/localhost/2?receiver-name=Exchange ALLOW_REGISTRATIONS = YES SERVE = http diff --git a/src/cli/test_reducer_free.conf b/src/cli/test_reducer_free.conf @@ -81,7 +81,7 @@ MAX_DEBT = TESTKUDOS:50.0 MAX_DEBT_BANK = TESTKUDOS:100000.0 HTTP_PORT = 8082 SUGGESTED_EXCHANGE = http://localhost:8081/ -SUGGESTED_EXCHANGE_PAYTO = payto://x-taler-bank/localhost/2 +SUGGESTED_EXCHANGE_PAYTO = payto://x-taler-bank/localhost/2?receiver-name=Exchange ALLOW_REGISTRATIONS = YES SERVE = http @@ -90,7 +90,7 @@ IDLE_RESERVE_EXPIRATION_TIME = 4 weeks LEGAL_RESERVE_EXPIRATION_TIME = 7 years [exchange-account-1] -PAYTO_URI = payto://x-taler-bank/localhost/Exchange +PAYTO_URI = payto://x-taler-bank/localhost/Exchange?receiver-name=Exchange enable_debit = yes enable_credit = yes