View Issue Details

IDProjectCategoryView StatusLast Update
0004519Talermerchant backendpublic2024-01-12 13:04
ReporterChristian Grothoff 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
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Version0.0 
Target Version0.0Fixed in Version0.0 
Summary0004519: bookmarking does not work
DescriptionWhen I got to the blog, buy an article, leave the page, clear the cookies and go back to the article, I'm asked to pay again.

The expected behavior is that the wallet receives a contract, detects that it is equivalent to an existing contract, replays the old payment and receives access to the content without the user even noticing all that, and certainly without the user paying again.

This does work if I go via the history, but not if I just re-visit the page after clearing cookies.

This process should also be added to the selenium tests.
Steps To Reproducego to blog
buy article
leave page
clear cookies
return to purchased page
Additional InformationI don't know if it is the merchant (bad contract UUID) or the wallet (fails to check for existing contract) that is to blame here.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

related to 0004523 closedMarcello Stanisci selenium test should check if bookmarking works 

Activities

Florian Dold

2016-05-23 12:37

manager   ~0010707

ERROR:talerfrontends.helpers:failed to POST to 'https://shop.test.taler.net/backend/contract'
Traceback (most recent call last):
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/test-green/local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/test-green/local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/test-green/local/lib/python3.5/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/test-green/local/lib/python3.5/site-packages/talerfrontends/blog/blog.py", line 136, in article
    contract_resp = sign_contract(restored_contract)
  File "/home/test-green/local/lib/python3.5/site-packages/talerfrontends/helpers.py", line 88, in sign_contract
    raise BackendError(r.status_code, r.text)
talerfrontends.helpers.BackendError: (403, 'Duplicate transaction ID!')

Florian Dold

2016-05-23 12:41

manager   ~0010708

Christian, this is caused by this commit in the backend:

commit d7eb23ad965c0207e561261588cbf742f93df935
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu May 5 13:47:17 2016 +0200

    check for duplicate transaction ID

Florian Dold

2016-05-23 12:45

manager   ~0010709

I think that the check introduced in that commit is bogus/unnecessary, since we're using /contract also for contract restoration.

Christian Grothoff

2016-05-23 21:20

manager   ~0010714

Ok, then please undo it -- but also extend the test driver to cover this execution path.

Florian Dold

2016-05-23 23:22

manager   ~0010721

Fixed in 3e8a86d, selenium coverage is tracked in the related bug.

Issue History

Date ModifiedUsernameFieldChange
2016-05-23 05:59Christian GrothoffNew Issue
2016-05-23 05:59Christian GrothoffStatusnew => assigned
2016-05-23 05:59Christian GrothoffAssigned To => Marcello Stanisci
2016-05-23 12:37Florian DoldNote Added: 0010707
2016-05-23 12:41Florian DoldNote Added: 0010708
2016-05-23 12:45Florian DoldNote Added: 0010709
2016-05-23 12:46Florian DoldAssigned ToMarcello Stanisci => Christian Grothoff
2016-05-23 12:46Florian DoldStatusassigned => feedback
2016-05-23 12:49Florian DoldRelationship addedrelated to 0004523
2016-05-23 15:53Florian DoldCategoryWeb site(s) => merchant backend API (C)
2016-05-23 21:20Christian GrothoffNote Added: 0010714
2016-05-23 21:20Christian GrothoffStatusfeedback => assigned
2016-05-23 23:22Florian DoldNote Added: 0010721
2016-05-23 23:22Florian DoldStatusassigned => informing
2016-05-23 23:22Florian DoldResolutionopen => fixed
2016-05-24 18:51Christian GrothoffFixed in Version => 0.0
2016-05-24 18:51Christian GrothoffTarget Version0.1 => 0.0
2016-05-26 12:26Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend