Strip null bytes from display names by default
This commit is contained in:
parent
25b7fcf7de
commit
83fbe80497
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ def display_name_from_app_data(app_data=None):
|
||||||
if dn == None: return None
|
if dn == None: return None
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
decoded = dn.decode("utf-8")
|
decoded = dn.decode("utf-8").replace("\x00", "").strip()
|
||||||
return decoded
|
return decoded
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log(f"Could not decode display name in included announce data. The contained exception was: {e}", RNS.LOG_ERROR)
|
RNS.log(f"Could not decode display name in included announce data. The contained exception was: {e}", RNS.LOG_ERROR)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue