View Issue Details

IDProjectCategoryView StatusLast Update
0006762Talermerchant backendpublic2024-01-12 13:04
Reportersebasjm Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
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)   

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2021-02-19 23:30

manager   ~0017557

Fixed in c060666e..178d7928

Christian Grothoff

2021-09-02 16:23

manager   ~0018359

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2021-02-19 20:41sebasjmNew Issue
2021-02-19 20:41sebasjmStatusnew => assigned
2021-02-19 20:41sebasjmAssigned To => Christian Grothoff
2021-02-19 20:41sebasjmFile Added: script-crash.sh
2021-02-19 23:30Christian GrothoffNote Added: 0017557
2021-02-19 23:30Christian GrothoffStatusassigned => informing
2021-02-19 23:30Christian GrothoffResolutionopen => fixed
2021-02-19 23:30Christian GrothoffFixed in Version => 0.9
2021-02-19 23:30Christian GrothoffTarget Version => 0.9
2021-02-19 23:30Christian GrothoffSteps to Reproduce Updated
2021-02-19 23:30Christian GrothoffAdditional Information Updated
2021-07-30 11:57Christian GrothoffFixed in Version0.9 => 0.8.1
2021-07-30 11:59Christian GrothoffTarget Version0.9 => 0.8.1
2021-07-30 12:02Christian GrothoffFixed in Version0.8.1 => 0.8
2021-07-30 12:02Christian GrothoffTarget Version0.8.1 => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2021-09-02 16:22Christian Grothoff
2021-09-02 16:23Christian GrothoffNote Added: 0018359
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend