View Issue Details

IDProjectCategoryView StatusLast Update
0009715Talerexchange KYC customer webuipublic2025-05-10 02:13
ReporterChristian Grothoff Assigned Tosebasjm 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
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version1.0Fixed in Version1.0 
Summary0009715: ID document upload broken
DescriptionThe JSON contains:

   "PERSONAL_IDENTIFICATION_DOCUMENT_COPY": {
     "text": "[object Object]"
   }

So instead of the actual file (with meta data) literally the string "[object Object]". That's what's uploaded to the exchange, this is not some rendering I'm doing AFAIK.
Steps To ReproduceUploaded a PDF to VQF 902.1 for the identification document of a natural person, hit submit.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

sebasjm

2025-04-08 22:10

developer   ~0024455

The problem comes in the conversion from the FORM validated object in the SPA to the type of data expected by the exchange currenty 'application/x-www-form-urlencoded'
I changed the SPA to send `application/json` as all other endpoints but the server doesn't accept that.


This is how the SPA is sending the form data
$ curl 'http://exchange.taler.test:1180/kyc-upload/HJWD970B6PA1P8VAF091MNCY04K185SNZ0Z6AXVT93KD99899C20-0-3' -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data-raw 'DOWNLOADED_TERMS_OF_SERVICE=true&ACCEPTED_TERMS_OF_SERVICE=true'


Which I think it is later converted to the `$FIELD_NAME: { text: $FIELD_VALUE }` and also breaking other things like the document upload mentioned in the issue.

This is how it should be posted. But server returns 500
$ curl 'http://exchange.taler.test:1180/kyc-upload/HJWD970B6PA1P8VAF091MNCY04K185SNZ0Z6AXVT93KD99899C20-0-3' -H 'Content-Type: application/json' --data-raw '{"DOWNLOADED_TERMS_OF_SERVICE":true,"ACCEPTED_TERMS_OF_SERVICE":true}'
{
  "code": 71,
  "hint": "The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate.",
  "detail": "MHD_create_post_processor"
}

sebasjm

2025-04-08 22:27

developer   ~0024456

INFO Handling request (POST) for URL '/kyc-upload/HJWD970B6PA1P8VAF091MNCY04K185SNZ0Z6AXVT93KD99899C20-0-3'
ERROR Assertion failed at taler-exchange-httpd_kyc-upload.c:403.

Christian Grothoff

2025-04-09 09:39

manager   ~0024470

I'll change the exchange to accept JSON uploads (and remove support for URL-encoding/form data).

Christian Grothoff

2025-04-09 09:43

manager   ~0024472

sebasjm: see spec change in taler-docs.git :: 0b30faf8..d555c7f6 => new requirement: "form_id".

Christian Grothoff

2025-04-09 11:19

manager   ~0024473

de59cf30a..7467b99c3 changes the /kyc-upload endpoint to support JSON. Needs to be tested with the new SPA.

sebasjm

2025-04-09 15:05

developer   ~0024483

a235ca87b..d369ae0d8 works the latest api

sebasjm

2025-04-09 15:11

developer   ~0024486

I suggest change form_id to FORM_ID as defined in GANA https://git.taler.net/gana.git/tree/gnu-taler-form-attributes/registry.rec#n1336

I couldn't find any reference in taler-exchange-httpd_kyc-upload.c

the SPA is now sending both fields

Christian Grothoff

2025-04-09 17:35

manager   ~0024489

Sure, FORM_ID is also fine with me. And no, we don't check it yet, I just figured we should make it mandatory.

Did you create the prebuilt and update the exchange submodule?

sebasjm

2025-04-09 17:35

developer   ~0024490

yep

Issue History

Date ModifiedUsernameFieldChange
2025-04-08 18:24Christian GrothoffNew Issue
2025-04-08 18:24Christian GrothoffStatusnew => assigned
2025-04-08 18:24Christian GrothoffAssigned To => sebasjm
2025-04-08 22:10sebasjmNote Added: 0024455
2025-04-08 22:27sebasjmNote Added: 0024456
2025-04-08 22:54sebasjmAssigned Tosebasjm => Christian Grothoff
2025-04-09 09:39Christian GrothoffNote Added: 0024470
2025-04-09 09:43Christian GrothoffNote Added: 0024472
2025-04-09 11:19Christian GrothoffNote Added: 0024473
2025-04-09 11:21Christian GrothoffAssigned ToChristian Grothoff => sebasjm
2025-04-09 15:05sebasjmNote Added: 0024483
2025-04-09 15:11sebasjmNote Added: 0024486
2025-04-09 15:11sebasjmAssigned Tosebasjm => Christian Grothoff
2025-04-09 15:11sebasjmStatusassigned => feedback
2025-04-09 17:35Christian GrothoffNote Added: 0024489
2025-04-09 17:35Christian GrothoffAssigned ToChristian Grothoff => sebasjm
2025-04-09 17:35Christian GrothoffStatusfeedback => assigned
2025-04-09 17:35sebasjmStatusassigned => informing
2025-04-09 17:35sebasjmResolutionopen => fixed
2025-04-09 17:35sebasjmNote Added: 0024490
2025-05-10 02:12Christian GrothoffFixed in Version => 1.0
2025-05-10 02:13Christian GrothoffStatusinforming => closed
2026-08-23 14:17Florian DoldCategoryexchange KYC SPA => exchange KYC customer webui