View Issue Details

IDProjectCategoryView StatusLast Update
0006780Talermechant backendpublic2021-09-02 18:23
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006780: merchant backend interprets some instance URLs incorrectly
DescriptionCan be reproduced with this test:

$ taler-wallet-cli testing run-integrationtests merchant-instances-urls

These currently go wrong:

http://localhost:8083/instances/foobar/config
=> This one should return 404 if instance "foobar" doesn't exist, but it returns 200

http://localhost:8083/private/instances/myinst/orders
=> This one should also return 404, as "instances/myinst/orders" is not a private endpoint of the default instance. Furthermore, in this case it would be ambiguous if this refers to the public or private "orders" endpoint.
TagsNo tags attached.

Activities

Florian Dold

2021-03-03 21:29

manager   ~0017588

Additionally reported by sebasjm:

http://localhost:8083/instances/foo/private/instances
=> This one should 404, as "foo" is not the default instances and thus not allowed to manage instances. But it currently seems to return 200.

Christian Grothoff

2021-03-04 12:10

manager   ~0017595

3923209..1ca25d6 should fix these.

Christian Grothoff

2021-03-04 12:11

manager   ~0017596

Note that /instances/default/private/instances now intentionally (!) also 404s. /private/instances is ONLY available at the top-level.

Florian Dold

2021-03-04 12:54

manager   ~0017597

One of the test cases is still failing:

http://localhost:8083/instances/default/private/instances

=> The test case wants this to be 200, but the merchant backend gives 404.

Of course it's debatable which one is correct here. But I would think the following base URLs should be *equivalent* in every aspect:

http://localhost:8083/instances/default/
http://localhost:8083/

right?!

Florian Dold

2021-03-04 12:55

manager   ~0017598

Oop, didn't read your previous comment. Seems fine.

Christian Grothoff

2021-09-02 18:23

manager   ~0018357

Fix committed to master branch.

Related Changesets

merchant: master 1ca25d6d

2021-03-04 13:08

Christian Grothoff


Details Diff
fix 0006780 Affected Issues
0006780
mod - src/backend/taler-merchant-httpd.c Diff File
mod - src/lib/merchant_api_delete_instance.c Diff File
mod - src/lib/merchant_api_get_instance.c Diff File
mod - src/lib/merchant_api_patch_instance.c Diff File
mod - src/testing/testing_api_cmd_delete_order.c Diff File

Issue History

Date Modified Username Field Change
2021-03-02 21:56 Florian Dold New Issue
2021-03-02 21:56 Florian Dold Status new => assigned
2021-03-02 21:56 Florian Dold Assigned To => Christian Grothoff
2021-03-03 21:29 Florian Dold Note Added: 0017588
2021-03-04 12:10 Christian Grothoff Note Added: 0017595
2021-03-04 12:11 Christian Grothoff Note Added: 0017596
2021-03-04 12:12 Christian Grothoff Status assigned => resolved
2021-03-04 12:12 Christian Grothoff Resolution open => fixed
2021-03-04 12:12 Christian Grothoff Fixed in Version => 0.9
2021-03-04 12:12 Christian Grothoff Product Version => git (master)
2021-03-04 12:12 Christian Grothoff Target Version => 0.9
2021-03-04 12:54 Florian Dold Status resolved => assigned
2021-03-04 12:54 Florian Dold Note Added: 0017597
2021-03-04 12:55 Florian Dold Note Added: 0017598
2021-03-04 12:55 Florian Dold Status assigned => resolved
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 1ca25d6d
2021-09-02 18:23 Christian Grothoff Note Added: 0018357