mirror of https://gitlab.com/bashrc2/epicyon
Email actor attachment validation
parent
cac51de657
commit
58761260eb
10
pgp.py
10
pgp.py
|
@ -48,6 +48,7 @@ def get_email_address(actor_json: {}) -> str:
|
||||||
if not name_value:
|
if not name_value:
|
||||||
continue
|
continue
|
||||||
if not name_value.lower().startswith('email'):
|
if not name_value.lower().startswith('email'):
|
||||||
|
if 'Mail' not in name_value:
|
||||||
continue
|
continue
|
||||||
if not property_value.get('type'):
|
if not property_value.get('type'):
|
||||||
continue
|
continue
|
||||||
|
@ -57,11 +58,14 @@ def get_email_address(actor_json: {}) -> str:
|
||||||
continue
|
continue
|
||||||
if not property_value['type'].endswith('PropertyValue'):
|
if not property_value['type'].endswith('PropertyValue'):
|
||||||
continue
|
continue
|
||||||
if '@' not in property_value[prop_value_name]:
|
value_str = remove_html(property_value[prop_value_name])
|
||||||
|
if '://' in value_str:
|
||||||
continue
|
continue
|
||||||
if '.' not in property_value[prop_value_name]:
|
if '@' not in value_str:
|
||||||
continue
|
continue
|
||||||
return remove_html(property_value[prop_value_name])
|
if '.' not in value_str:
|
||||||
|
continue
|
||||||
|
return value_str
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue