View Issue Details

IDProjectCategoryView StatusLast Update
0005336Talertwisterpublic2019-12-20 19:12
ReporterMarcello Stanisci Assigned ToMarcello Stanisci  
PrioritynormalSeveritytweakReproducibilityrandom
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005336: Flipping should respect Crockford encoding.
DescriptionSome test CMDs instrcut the Twister to flip a char, because
they may want to get a signature that fails to verify.

Sometimes, the flipping makes a supposedly base32-encoded
string fail to be decoded in its binary form, because the
Twister made the flipped string non base32-encoded anymore.

This situation results in the test case fail because the CMD
gets a 400 Bad request response code that was not expected.

Thus the Twister must always make sure that the flipped char
gets a Crockford base32 friendly replacement.
Steps To ReproduceImpossible, this depends entirely on the flipping logic, which is random now.
Additional InformationThe following error is an example of such a bug.

May 25 20:26:52-382631 taler-exchange-httpd-13089 INFO Handling request for URL '/refresh/reveal'
May 25 20:26:52-382731 taler-exchange-httpd-13089 INFO Handling request for URL '/refresh/reveal'
May 25 20:26:52-382749 taler-exchange-httpd-13089 INFO Handling request for URL '/refresh/reveal'
May 25 20:26:52-382871 taler-exchange-httpd-13089 WARNING External protocol violation detected at json_helper.c:75.
May 25 20:26:52-383025 util-scheduler-13050 DEBUG Running task 0x5642bb31fb10
May 25 20:26:52-383064 test-exchange-api-new-twisted-13050 DEBUG Downloaded body: {"error":"parse error","field":"<no field>","line":0}
May 25 20:26:52-383080 test-exchange-api-new-twisted-13050 ERROR Unexpected response code 400 to command refresh-(flipped-)reveal
{"error": "parse error", "field": "<no field>", "line": 0}May 25 20:26:52-383118 test-exchange-api-new-twisted-13050 ERROR Failed at command `refresh-(flipped-)reveal'
TagsNo tags attached.

Activities

Marcello Stanisci

2018-06-04 11:06

reporter   ~0012978

Last edited: 2018-06-04 11:09

25da33b51ff2 fixes it. The logic tries to randomly pick a character
from an array that contains only those that are Crockford-compliant,
and _loops_ until one different from the one to be replaced is found.

There is a chance that the logic would loop, but it is as little as
the chance that a GNUNET_CRYPTO_QUALITY_STRONG random number is always
the same "for ever", and that the character indexed by it into the Crockford-array equals the character to be replaced.

Issue History

Date Modified Username Field Change
2018-06-01 16:37 Marcello Stanisci New Issue
2018-06-01 16:37 Marcello Stanisci Status new => assigned
2018-06-01 16:37 Marcello Stanisci Assigned To => Marcello Stanisci
2018-06-01 16:37 Marcello Stanisci Target Version => 0.6
2018-06-03 14:34 Christian Grothoff Severity minor => tweak
2018-06-03 14:34 Christian Grothoff Reproducibility have not tried => random
2018-06-03 14:34 Christian Grothoff Product Version => git (master)
2018-06-04 11:06 Marcello Stanisci Note Added: 0012978
2018-06-04 11:07 Marcello Stanisci Status assigned => resolved
2018-06-04 11:07 Marcello Stanisci Resolution open => fixed
2018-06-04 11:09 Marcello Stanisci Note Edited: 0012978
2018-06-12 09:00 Christian Grothoff Fixed in Version => 0.6
2019-12-20 19:12 Christian Grothoff Status resolved => closed