View Issue Details

IDProjectCategoryView StatusLast Update
0011848Talermerchant backendpublic2026-10-02 12:09
Reportervecirex Assigned ToFlorian Dold  
PriorityurgentSeveritymajorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0011848: merchant: enforce http(s) website URL - bare host breaks /pay (pay-no-deposit) since v1.6.15
DescriptionOn /pay, contract re-parse fails when merchant.website is a bare host
(e.g., www.example.ch) instead of a full http(s) URL.

Observed (merchant log):
WARNING ... Failed to parse JSON in merchant.website
ASSERT ... TALER_JSON_spec_web_url_copy
HTTP 500  ec=2008  pay-no-deposit


Since v1.6.15, website is parsed with TALER_JSON_spec_web_url_copy in
merchant_parse.c. TALER_is_web_url requires an http or https scheme.
Instance create/PATCH already use TALER_JSON_spec_web_url ("website");
legacy DB rows and old contracts still carry bare hosts and break /pay.
cf. https://git.taler.net/taler/merchant/commit/567107a79abf3ad446901ec5d4602ea5a5e2b17c.html
(2026-08-05, use spec_web_url instead of spec_string where applicable)

Possible solution:
- Reject bare hosts on write and/or migrate stored website to https://...
- Keep create/PATCH web_url checks; align contract re-parse error to a
  clear client-facing code instead of pay-no-deposit 500 where possible.

Code (merchant_parse.c, since 567107a79abf):
TALER_JSON_spec_web_url_copy ("website", &merchant->website),


Valid: https://www.example.ch
Invalid: www.example.ch
Additional InformationHotfix (ops): set instance website to a full https URL, e.g.,
https://www.example.ch -- then /pay succeeds for new contracts.
I did this in one production case seen.
Does not fix legacy contracts that already embedded a bare host.
Tagsmytops, quality

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-10-02 12:09 vecirex New Issue
2026-10-02 12:09 vecirex Status new => assigned
2026-10-02 12:09 vecirex Assigned To => Florian Dold
2026-10-02 12:09 vecirex Tag Attached: mytops
2026-10-02 12:09 vecirex Tag Attached: quality