View Issue Details

IDProjectCategoryView StatusLast Update
0008456Talermerchant backendpublic2024-03-07 19:47
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
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008456: merchan backend complains about credentials being wrong when URL is missing a /
Descriptionhttps://git.taler.net/merchant.git/tree/src/bank/mb_parse.c#n125

$ curl 'http://merchant.taler.test:1180/private/accounts' --data-raw '{"payto_uri":"payto://x-taler-bank/e/e?receiver-name=e","credit_facade_url":"http://evil.com","credit_facade_credentials":{"type":"BASIC","username":"we","password":"we"}}'
{
  "code": 26,
  "hint": "A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers.",
  "detail": "credit_facade_credentials"
}
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

sebasjm

2024-02-20 20:17

developer   ~0021394

also, this request should not be valid since doesn't have URL

$ curl 'http://merchant.taler.test:1180/private/accounts/SP8R9SG0WEYXKPE85Z8V71EBKWG6VZMYMZMP77MNX2GAWDSD5F5MACV05YTBB1F5E24GR85KH41XD5R594Y6J81XY29SX0KKQ5RKRTR' -X 'PATCH' -v --data-raw '{"credit_facade_credentials":{"type":"basic","password":"we","username":"we"}}'
* Trying 127.0.0.1:1180...
* Connected to merchant.taler.test (127.0.0.1) port 1180 (#0)
> PATCH /private/accounts/SP8R9SG0WEYXKPE85Z8V71EBKWG6VZMYMZMP77MNX2GAWDSD5F5MACV05YTBB1F5E24GR85KH41XD5R594Y6J81XY29SX0KKQ5RKRTR HTTP/1.1
< HTTP/1.1 204 No Content

Christian Grothoff

2024-02-21 18:46

manager   ~0021412

I don't see the issue. The credit_facade_url is specified as mandatory ending with "/". The error message says the credit_facade_url is malformed, as it is. Why do you think this is even a bug?

The 2nd request is well-formed: the credit_facade_url is specified as *optional*. So it is OK to be missing. Sure, the other credentials are then not useful, but that doesn't make the request invalid. In fact, the user may want to keep/store/preserve the credentials and could just disable the credit facade by setting the URL to empty.

So again, I don't see an issue here.

sebasjm

2024-02-21 18:54

developer   ~0021413

the problem is that the error message says that the credentials are wrong, they are not

the URL is, that's OK, I agree and it's not part of the problem

I even point out here https://git.taler.net/merchant.git/tree/src/bank/mb_parse.c#n125 is checking URL in the function that should check credentials

Christian Grothoff

2024-02-21 20:13

manager   ~0021425

Ah, I see. We refer to the wrong field, because due to the internal logic we actually don't know which of the two went south. Fixing the message to refer to *both* fields.

Christian Grothoff

2024-02-21 20:13

manager   ~0021426

Fixed in 9b21f07..ba762c3

Issue History

Date ModifiedUsernameFieldChange
2024-02-20 19:49sebasjmNew Issue
2024-02-20 19:49sebasjmStatusnew => assigned
2024-02-20 19:49sebasjmAssigned To => Christian Grothoff
2024-02-20 20:17sebasjmNote Added: 0021394
2024-02-21 18:46Christian GrothoffNote Added: 0021412
2024-02-21 18:46Christian GrothoffAssigned ToChristian Grothoff => sebasjm
2024-02-21 18:46Christian GrothoffStatusassigned => feedback
2024-02-21 18:54sebasjmNote Added: 0021413
2024-02-21 18:54sebasjmAssigned Tosebasjm => Christian Grothoff
2024-02-21 20:13Christian GrothoffNote Added: 0021425
2024-02-21 20:13Christian GrothoffNote Added: 0021426
2024-02-21 20:13Christian GrothoffStatusfeedback => informing
2024-02-21 20:13Christian GrothoffResolutionopen => fixed
2024-02-21 20:13Christian GrothoffFixed in Version => 0.9.4
2024-03-07 19:47Christian GrothoffStatusinforming => closed
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend