mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-20 06:50:23 +03:00
limited ip size length
This commit is contained in:
parent
48cd8240e9
commit
e15ba650f9
@ -298,8 +298,12 @@ class UserService(UUIDModel): # pylint: disable=too-many-public-methods
|
||||
Returns:
|
||||
Nothing
|
||||
"""
|
||||
self.src_ip = ip
|
||||
self.src_hostname = hostname
|
||||
self.src_ip = ip[:15]
|
||||
self.src_hostname = hostname[:65]
|
||||
|
||||
if(self.src_ip != ip or self.src_hostname != hostname):
|
||||
logger.info('Truncated connection source data to %s/%s', self.src_ip, self.src_hostname)
|
||||
|
||||
self.save(update_fields=['src_ip', 'src_hostname'])
|
||||
|
||||
def getConnectionSource(self) -> typing.Tuple[str, str]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user