Skip to content

Commit 2fc4fdd

Browse files
committed
chg: [onion lookup] hide titles fron unsafe domains
1 parent f694c5d commit 2fc4fdd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bin/lib/crawlers.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ def api_get_onion_lookup(domain): # TODO check if object process done ???
115115
del meta['type']
116116
del meta['status']
117117
meta['titles'] = []
118-
for h in dom.get_correlation('title').get('title', []):
119-
t = Titles.Title(h[1:])
120-
meta['titles'].append(t.get_content())
118+
if not Tag.is_tags_safe(tags):
119+
meta['titles'].append("Redacted")
120+
else:
121+
for h in dom.get_correlation('title').get('title', []):
122+
t = Titles.Title(h[1:])
123+
meta['titles'].append(t.get_content())
121124
return meta
122125

123126
def api_get_domain_from_url(url):

0 commit comments

Comments
 (0)