basetabs: return a copy of ChatTab.jid to prevent nasty (mutability) side-effects

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-10-14 15:43:56 +02:00
parent 7587b954e3
commit 8ee9abdd69
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -13,6 +13,7 @@ This module also defines ChatTabs, the parent class for all tabs
revolving around chats.
"""
import copy
import logging
import string
import asyncio
@ -538,7 +539,7 @@ class ChatTab(Tab):
@property
def jid(self) -> JID:
return self._jid
return copy.copy(self._jid)
@jid.setter
def jid(self, value: JID) -> None: