Check start of briar address

merge-requests/8/head
Bob Mottram 2020-12-24 16:55:06 +00:00
parent 26e82060f1
commit 42023ade49
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,8 @@ def getBriarAddress(actorJson: {}) -> str:
propertyValue['value'] = propertyValue['value'].strip()
if len(propertyValue['value']) < 50:
continue
if not propertyValue['value'].startswith('briar://'):
continue
if propertyValue['value'].lower() != propertyValue['value']:
continue
if '"' in propertyValue['value']:
@ -47,6 +49,8 @@ def setBriarAddress(actorJson: {}, briarAddress: str) -> None:
if len(briarAddress) < 50:
notBriarAddress = True
if not briarAddress.startswith('briar://'):
notBriarAddress = True
if briarAddress.lower() != briarAddress:
notBriarAddress = True
if '"' in briarAddress: