View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005336 | Taler | twister | public | 2018-06-01 16:37 | 2019-12-20 19:12 |
Reporter | Marcello Stanisci | Assigned To | Marcello Stanisci | ||
Priority | normal | Severity | tweak | Reproducibility | random |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.6 | Fixed in Version | 0.6 | ||
Summary | 0005336: Flipping should respect Crockford encoding. | ||||
Description | Some 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 Reproduce | Impossible, this depends entirely on the flipping logic, which is random now. | ||||
Additional Information | The 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' | ||||
Tags | No tags attached. | ||||
|
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. |
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 |