View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009715 | Taler | exchange KYC SPA | public | 2025-04-08 20:24 | 2025-04-09 19:35 |
Reporter | Christian Grothoff | Assigned To | sebasjm | ||
Priority | normal | Severity | block | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | i7 | OS | Debian GNU/Linux | OS Version | squeeze |
Product Version | git (master) | ||||
Target Version | 1.0 | ||||
Summary | 0009715: ID document upload broken | ||||
Description | The 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 Reproduce | Uploaded a PDF to VQF 902.1 for the identification document of a natural person, hit submit. | ||||
Tags | No tags attached. | ||||
|
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" } |
|
INFO Handling request (POST) for URL '/kyc-upload/HJWD970B6PA1P8VAF091MNCY04K185SNZ0Z6AXVT93KD99899C20-0-3' ERROR Assertion failed at taler-exchange-httpd_kyc-upload.c:403. |
|
I'll change the exchange to accept JSON uploads (and remove support for URL-encoding/form data). |
|
sebasjm: see spec change in taler-docs.git :: 0b30faf8..d555c7f6 => new requirement: "form_id". |
|
de59cf30a..7467b99c3 changes the /kyc-upload endpoint to support JSON. Needs to be tested with the new SPA. |
|
a235ca87b..d369ae0d8 works the latest api |
|
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 |
|
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? |
|
yep |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-04-08 20:24 | Christian Grothoff | New Issue | |
2025-04-08 20:24 | Christian Grothoff | Status | new => assigned |
2025-04-08 20:24 | Christian Grothoff | Assigned To | => sebasjm |
2025-04-09 00:10 | sebasjm | Note Added: 0024455 | |
2025-04-09 00:27 | sebasjm | Note Added: 0024456 | |
2025-04-09 00:54 | sebasjm | Assigned To | sebasjm => Christian Grothoff |
2025-04-09 11:39 | Christian Grothoff | Note Added: 0024470 | |
2025-04-09 11:43 | Christian Grothoff | Note Added: 0024472 | |
2025-04-09 13:19 | Christian Grothoff | Note Added: 0024473 | |
2025-04-09 13:21 | Christian Grothoff | Assigned To | Christian Grothoff => sebasjm |
2025-04-09 17:05 | sebasjm | Note Added: 0024483 | |
2025-04-09 17:11 | sebasjm | Note Added: 0024486 | |
2025-04-09 17:11 | sebasjm | Assigned To | sebasjm => Christian Grothoff |
2025-04-09 17:11 | sebasjm | Status | assigned => feedback |
2025-04-09 19:35 | Christian Grothoff | Note Added: 0024489 | |
2025-04-09 19:35 | Christian Grothoff | Assigned To | Christian Grothoff => sebasjm |
2025-04-09 19:35 | Christian Grothoff | Status | feedback => assigned |
2025-04-09 19:35 | sebasjm | Status | assigned => resolved |
2025-04-09 19:35 | sebasjm | Resolution | open => fixed |
2025-04-09 19:35 | sebasjm | Note Added: 0024490 |