commit 65d6beafc932018be5de77484932da93ad8902ad
parent 34a9668a9114f09889f732f0a29d9673f8a9cc37
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sat, 18 Jul 2026 00:49:38 +0200
add FIXME
Diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/util/qr.c b/src/util/qr.c
@@ -23,12 +23,13 @@
#include "donau_util.h"
#include "donau_service.h"
+
// FIXME: remove public key, only needed for testing.
// The verification app should get the public key directly from the Donau.
char *
-DONAU_generate_qr_string (const struct DONAU_DonauPublicKeyP *pub_key,
- const struct DONAU_DonationStatement *
- donation_statement)
+DONAU_generate_qr_string (
+ const struct DONAU_DonauPublicKeyP *pub_key,
+ const struct DONAU_DonationStatement *donation_statement)
{
/* The string will be structured as follows: YEAR/TOTALAMOUNT/TAXID/TAXIDSALT/ED25519SIGNATURE/PUBKEY */
char *end_sig;
@@ -49,10 +50,11 @@ DONAU_generate_qr_string (const struct DONAU_DonauPublicKeyP *pub_key,
pub_str,
sizeof (pub_str));
*end_pub = '\0';
+ /* FIXME: escape donor_tax_id, as it might contain / or
+ other characters that are not safe here... */
GNUNET_asprintf (&qr_string,
- "%llu/%s/%s/%s/%s/%s",
- (unsigned long long)
- donation_statement->year,
+ "%u/%s/%s/%s/%s/%s",
+ (unsigned int) donation_statement->year,
TALER_amount2s (&donation_statement->total_amount),
donation_statement->donor_tax_id,
donation_statement->salt,