mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-27 06:35:16 -04:00
Merge remote-tracking branch 'upstream/release-v1.51'
This commit is contained in:
commit
50ad805804
135 changed files with 2564 additions and 1648 deletions
|
@ -71,6 +71,7 @@ class Auth:
|
|||
self._auth_blocking = AuthBlocking(self.hs)
|
||||
|
||||
self._track_appservice_user_ips = hs.config.appservice.track_appservice_user_ips
|
||||
self._track_puppeted_user_ips = hs.config.api.track_puppeted_user_ips
|
||||
self._macaroon_secret_key = hs.config.key.macaroon_secret_key
|
||||
self._force_tracing_for_users = hs.config.tracing.force_tracing_for_users
|
||||
|
||||
|
@ -246,6 +247,18 @@ class Auth:
|
|||
user_agent=user_agent,
|
||||
device_id=device_id,
|
||||
)
|
||||
# Track also the puppeted user client IP if enabled and the user is puppeting
|
||||
if (
|
||||
user_info.user_id != user_info.token_owner
|
||||
and self._track_puppeted_user_ips
|
||||
):
|
||||
await self.store.insert_client_ip(
|
||||
user_id=user_info.user_id,
|
||||
access_token=access_token,
|
||||
ip=ip_addr,
|
||||
user_agent=user_agent,
|
||||
device_id=device_id,
|
||||
)
|
||||
|
||||
if is_guest and not allow_guest:
|
||||
raise AuthError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue