View Issue Details

IDProjectCategoryView StatusLast Update
0006762Talermechant backendpublic2024-01-12 14:04
Reportersebasjm Assigned ToChristian Grothoff  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006762: sending an empty string in payto array make the merchant crash
Descriptionsending an empty string in payto array make the merchant crash
Steps To Reproducecurl -q https://backend.demo.taler.net/private/instances/VmoPyCOWycbc74K1 -H 'Authorization: ApiKey sandbox' -X PATCH --data-raw '{"default_wire_transfer_delay":{"d_ms":2000},"default_pay_delay":{"d_ms":1000},"jurisdiction":{},"address":{},"default_wire_fee_amortization":10,"default_max_wire_fee":"KUDOS:2","default_max_deposit_fee":"KUDOS:1","payto_uris":[""],"name":"qwe"}'
Additional InformationThe errors tells that an assert fails at taler-merchant-httpd_private-patch-instances-ID:307 so adding that check into the next if could be a solution.

         GNUNET_assert (NULL != wm->j_wire);
         wm->wire_method
           = TALER_payto_get_method (ad.payto_uri);
- GNUNET_assert (NULL != wm->wire_method);
         /* This also tests for things like the IBAN being malformed */
- if (GNUNET_OK !=
+ if (NULL == wm->wire_method || GNUNET_OK !=
             TALER_JSON_merchant_wire_signature_hash (wm->j_wire,
                                                      &wm->h_wire))
         {
TagsNo tags attached.
Attached Files
script-crash.sh (1,047 bytes)   
#/bin/bash

ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)

echo create instance with id $ID
HOST=https://backend.demo.taler.net
AUTH="ApiKey sandbox"
CURRENCY=KUDOS
#HOST=http://localhost:9966
#AUTH="Bearer secret-token:super_secret"
#CURRENCY=COL

set -x
curl -q $HOST/private/instances     -H "Authorization: $AUTH" --data-raw '{"default_wire_transfer_delay":{"d_ms":2000},"default_pay_delay":{"d_ms":1000},"jurisdiction":{},"address":{},"default_wire_fee_amortization":10,"default_max_wire_fee":"'$CURRENCY':2","default_max_deposit_fee":"'$CURRENCY':1","payto_uris":[],"name":"qwe","id":"'$ID'"}'

curl -q $HOST/private/instances/$ID -H "Authorization: $AUTH" | jq '.accounts'

curl -q $HOST/private/instances/$ID -H "Authorization: $AUTH" -X PATCH --data-raw '{"default_wire_transfer_delay":{"d_ms":2000},"default_pay_delay":{"d_ms":1000},"jurisdiction":{},"address":{},"default_wire_fee_amortization":10,"default_max_wire_fee":"'$CURRENCY':2","default_max_deposit_fee":"'$CURRENCY':1","payto_uris":[""],"name":"qwe"}'

script-crash.sh (1,047 bytes)   

Activities

Christian Grothoff

2021-02-20 00:30

manager   ~0017557

Fixed in c060666e..178d7928

Christian Grothoff

2021-09-02 18:23

manager   ~0018359

Fix committed to master branch.

Related Changesets

merchant: master 178d7928

2021-02-20 01:29

Christian Grothoff


Details Diff
fix 0006762 Affected Issues
0006762
mod - src/backend/taler-merchant-httpd_private-patch-instances-ID.c Diff File

Issue History

Date Modified Username Field Change
2021-02-19 21:41 sebasjm New Issue
2021-02-19 21:41 sebasjm Status new => assigned
2021-02-19 21:41 sebasjm Assigned To => Christian Grothoff
2021-02-19 21:41 sebasjm File Added: script-crash.sh
2021-02-20 00:30 Christian Grothoff Note Added: 0017557
2021-02-20 00:30 Christian Grothoff Status assigned => resolved
2021-02-20 00:30 Christian Grothoff Resolution open => fixed
2021-02-20 00:30 Christian Grothoff Fixed in Version => 0.9
2021-02-20 00:30 Christian Grothoff Target Version => 0.9
2021-02-20 00:30 Christian Grothoff Steps to Reproduce Updated
2021-02-20 00:30 Christian Grothoff Additional Information Updated
2021-07-30 13:57 Christian Grothoff Fixed in Version 0.9 => 0.8.1
2021-07-30 13:59 Christian Grothoff Target Version 0.9 => 0.8.1
2021-07-30 14:02 Christian Grothoff Fixed in Version 0.8.1 => 0.8
2021-07-30 14:02 Christian Grothoff Target Version 0.8.1 => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2021-09-02 18:22 Christian Grothoff Changeset attached => Taler-merchant master 178d7928
2021-09-02 18:23 Christian Grothoff Note Added: 0018359
2024-01-12 14:04 Christian Grothoff Category merchant backend API (C) => mechant backend