log and handle misformed claims from #1611

This commit is contained in:
Victor Shyba 2018-11-10 16:52:01 -03:00 committed by Lex Berezhny
parent 457a56ce04
commit 8394dcb663

View file

@ -415,6 +415,12 @@ def _decode_claim_result(claim):
if not claim['signature_is_valid']:
log.warning("lbry://%s#%s has an invalid signature",
claim['name'], claim['claim_id'])
if 'value' not in claim:
log.warning('Got an invalid claim while parsing, please report: %s', claim)
claim['hex'] = None
claim['value'] = None
claim['error'] = "Failed to parse: missing value"
return claim
try:
decoded = smart_decode(claim['value'])
claim_dict = decoded.claim_dict