mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 10:24:46 +00:00
Check the domain looks like a domain when extracting mentions
This commit is contained in:
1 parent
470f32382a
commit
072481cc2b
1 file changed
+3
-1
+3
-1
@@ -130,8 +130,10 @@ def addMention(wordStr: str,httpPrefix: str,following: str,replaceMentions: {},r
|
||||
return True
|
||||
# @nick@domain
|
||||
if '@' in possibleHandle:
|
||||
replaceDomain=possibleHandle.split('@')[1]
|
||||
if not (replaceDomain=='localhost' or '.' in replaceDomain):
|
||||
return False
|
||||
possibleNickname=possibleHandle.split('@')[0]
|
||||
replaceDomain=possibleHandle.split('@')[1]
|
||||
recipientActor=httpPrefix+"://"+replaceDomain+"/users/"+possibleNickname
|
||||
if recipientActor not in recipients:
|
||||
recipients.append(recipientActor)
|
||||
|
||||
Reference in new issue
Block a user