View Issue Details

IDProjectCategoryView StatusLast Update
0006762Talermerchant backend API (C)public2021-02-20 00:30
Reportersebasjm Assigned ToChristian Grothoff  
Status resolvedResolutionfixed 
Product Versiongit (master) 
Target Version0.9Fixed in Version0.9 
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 -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);
           = 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,
TagsNo tags attached.



2021-02-19 21:41

developer (1,047 bytes)   

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

echo create instance with id $ID
AUTH="ApiKey sandbox"
#AUTH="Bearer secret-token:super_secret"

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"}' (1,047 bytes)   

Christian Grothoff

2021-02-20 00:30

manager   ~0017557

Fixed in c060666e..178d7928

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:
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 View Revisions
2021-02-20 00:30 Christian Grothoff Additional Information Updated View Revisions