mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 05:36:05 +00:00
796a4b7482
* Perfer `type(x) is int` to `isinstance(x, int)` This covered all additional instances I could see where `x` was user-controlled. The remaining cases are ``` $ rg -s 'isinstance.*[^_]int' tests/replication/_base.py 576: if isinstance(obj, int): synapse/util/caches/stream_change_cache.py 136: assert isinstance(stream_pos, int) 214: assert isinstance(stream_pos, int) 246: assert isinstance(stream_pos, int) 267: assert isinstance(stream_pos, int) synapse/replication/tcp/external_cache.py 133: if isinstance(result, int): synapse/metrics/__init__.py 100: if isinstance(calls, (int, float)): synapse/handlers/appservice.py 262: assert isinstance(new_token, int) synapse/config/_util.py 62: if isinstance(p, int): ``` which cover metrics, logic related to `jsonschema`, and replication and data streams. AFAICS these are all internal to Synapse * Changelog |
||
---|---|---|
.. | ||
__init__.py | ||
account_data.py | ||
appservice.py | ||
cache.py | ||
censor_events.py | ||
client_ips.py | ||
deviceinbox.py | ||
devices.py | ||
directory.py | ||
e2e_room_keys.py | ||
end_to_end_keys.py | ||
event_federation.py | ||
event_push_actions.py | ||
events_bg_updates.py | ||
events_forward_extremities.py | ||
events_worker.py | ||
events.py | ||
filtering.py | ||
keys.py | ||
lock.py | ||
media_repository.py | ||
metrics.py | ||
monthly_active_users.py | ||
openid.py | ||
presence.py | ||
profile.py | ||
purge_events.py | ||
push_rule.py | ||
pusher.py | ||
receipts.py | ||
registration.py | ||
rejections.py | ||
relations.py | ||
room_batch.py | ||
room.py | ||
roommember.py | ||
search.py | ||
session.py | ||
signatures.py | ||
state_deltas.py | ||
state.py | ||
stats.py | ||
stream.py | ||
tags.py | ||
transactions.py | ||
ui_auth.py | ||
user_directory.py | ||
user_erasure_store.py |