verifying_key.verify_document exception if Peer document is not ascii
When a non ascii Peer document is verified by the function, an exception occur.
The problem is that the document come from Duniter mem_pool and the mem_pool should not accept non ascii documents.
But we can:
- catch the exception and try with utf-8 (not duniter compliant
- return False as if the signature was not correct.
Option 2 is better, as the document is not valid whatever the reason.
See : sakia#820
[EDIT] 04/03/2021 Version 0.61.0
Trying to catch the exception failed because non ascii endpoint fail when creating the Peer Document instance. HOST_REGEXP fail on non ascii endpoint.
So, as we do not know which endpoint cause the bug, put the issue in backlog, waiting for future p2p scan of peers to failed.