Check that type is a string

This commit is contained in:
bashrc committed 2026-05-05 17:40:22 +01:00
1 parent f4e8153383
commit b1abfffdcf
21 files changed
+94

No files matched your search

+2
View File
@@ -126,6 +126,8 @@ def set_art_site_url(actor_json: {}, art_site_url: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, art_fieldnames):
continue
+4
View File
@@ -36,6 +36,8 @@ def get_briar_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, prop_value = \
get_attachment_property_value(property_value)
if not prop_value:
@@ -126,6 +128,8 @@ def set_briar_address(actor_json: {}, briar_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('briar'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -36,6 +36,8 @@ def get_cwtch_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, prop_value = \
get_attachment_property_value(property_value)
if not prop_value:
@@ -114,6 +116,8 @@ def set_cwtch_address(actor_json: {}, cwtch_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('cwtch'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -39,6 +39,8 @@ def get_discord(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -96,6 +98,8 @@ def set_discord(actor_json: {}, discord: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, discord_fieldnames):
continue
+4
View File
@@ -59,6 +59,8 @@ def get_donation_url(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, prop_value = \
get_attachment_property_value(property_value)
if not prop_value:
@@ -151,6 +153,8 @@ def set_donation_url(actor_json: {}, donate_url: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if name_value.lower() != donate_name:
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -36,6 +36,8 @@ def get_enigma_pub_key(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -97,6 +99,8 @@ def set_enigma_pub_key(actor_json: {}, enigma_pub_key: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('enigma'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -253,6 +253,8 @@ def get_repo_url(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, prop_value = \
get_attachment_property_value(property_value)
if not prop_value:
@@ -278,6 +280,8 @@ def get_repo_url(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, prop_value = \
get_attachment_property_value(property_value)
if not prop_value:
+4
View File
@@ -85,6 +85,8 @@ def get_lxmf_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -171,6 +173,8 @@ def set_lxmf_address(base_dir: str, nickname: str, domain: str,
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('lxmf'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -41,6 +41,8 @@ def get_matrix_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -130,6 +132,8 @@ def set_matrix_address(actor_json: {}, matrix_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('matrix'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -37,6 +37,8 @@ def get_music_site_url(actor_json: {}) -> str:
continue
if not isinstance(property_value['type'], str):
continue
if not isinstance(property_value['type'], str):
continue
if not property_value['type'].endswith('PropertyValue'):
continue
prop_value_name, _ = \
@@ -102,6 +104,8 @@ def set_music_site_url(actor_json: {}, music_site_url: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, music_fieldnames):
continue
+6
View File
@@ -39,6 +39,8 @@ def get_peertube(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -54,6 +56,8 @@ def get_peertube(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -113,6 +117,8 @@ def set_peertube(actor_json: {}, peertube: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, peertube_fieldnames):
continue
+14
View File
@@ -71,6 +71,8 @@ def get_email_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -121,6 +123,8 @@ def get_deltachat_invite(actor_json: {}, translate: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -157,6 +161,8 @@ def get_pgp_pub_key(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -191,6 +197,8 @@ def get_pgp_fingerprint(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -260,6 +268,8 @@ def set_email_address(actor_json: {}, email_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('email'):
continue
if not property_value['type'].endswith('PropertyValue'):
@@ -385,6 +395,8 @@ def set_pgp_pub_key(actor_json: {}, pgp_pub_key: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('pgp'):
continue
if not property_value['type'].endswith('PropertyValue'):
@@ -458,6 +470,8 @@ def set_pgp_fingerprint(actor_json: {}, fingerprint: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('openpgp'):
continue
if not property_value['type'].endswith('PropertyValue'):
+6
View File
@@ -43,6 +43,8 @@ def get_pixelfed(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -75,6 +77,8 @@ def get_pixelfed(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -136,6 +140,8 @@ def set_pixelfed(actor_json: {}, pixelfed: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, pixelfed_fieldnames):
continue
+4
View File
@@ -39,6 +39,8 @@ def get_pronouns(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -96,6 +98,8 @@ def set_pronouns(actor_json: {}, pronouns: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, pronoun_fieldnames):
continue
+4
View File
@@ -36,6 +36,8 @@ def get_ssb_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -119,6 +121,8 @@ def set_ssb_address(actor_json: {}, ssb_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('ssb'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -36,6 +36,8 @@ def get_tox_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -125,6 +127,8 @@ def set_tox_address(actor_json: {}, tox_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith('tox'):
continue
if not property_value['type'].endswith('PropertyValue'):
+4
View File
@@ -194,6 +194,8 @@ def get_actor_languages_list(actor_json: {}) -> []:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -2890,6 +2892,8 @@ def get_actor_property_url(actor_json: {}, property_name: str) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
+2
View File
@@ -359,6 +359,8 @@ def _set_actor_property_url(actor_json: {},
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
if not name_value.lower().startswith(property_name_lower):
continue
if not property_value['type'].endswith('PropertyValue'):
+2
View File
@@ -571,6 +571,8 @@ def _webfinger_update_from_profile(wf_json: {}, actor_json: {}) -> bool:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
+4
View File
@@ -38,6 +38,8 @@ def get_xmpp_address(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -128,6 +130,8 @@ def set_xmpp_address(actor_json: {}, xmpp_address: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not (name_value.startswith('xmpp') or
name_value.startswith('jabber') or
+6
View File
@@ -39,6 +39,8 @@ def get_youtube(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -54,6 +56,8 @@ def get_youtube(actor_json: {}) -> str:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
prop_value_name, _ = \
get_attachment_property_value(property_value)
if not prop_value_name:
@@ -114,6 +118,8 @@ def set_youtube(actor_json: {}, youtube: str) -> None:
continue
if not property_value.get('type'):
continue
if not isinstance(property_value['type'], str):
continue
name_value = name_value.lower()
if not string_contains(name_value, youtube_fieldnames):
continue