|
53 | 53 | from twisted.python.threadpool import ThreadPool |
54 | 54 |
|
55 | 55 | from synapse.logging.loggers import ExplicitlyConfiguredLogger |
56 | | -from synapse.util.stringutils import random_string |
| 56 | +from synapse.util.stringutils import random_string_insecure_fast |
57 | 57 |
|
58 | 58 | if TYPE_CHECKING: |
59 | 59 | from synapse.logging.scopecontextmanager import _LogContextScope |
@@ -657,7 +657,7 @@ def __init__( |
657 | 657 | self, new_context: LoggingContextOrSentinel = SENTINEL_CONTEXT |
658 | 658 | ) -> None: |
659 | 659 | self._new_context = new_context |
660 | | - self._instance_id = random_string(5) |
| 660 | + self._instance_id = random_string_insecure_fast(5) |
661 | 661 |
|
662 | 662 | def __enter__(self) -> None: |
663 | 663 | logcontext_debug_logger.debug( |
@@ -859,7 +859,7 @@ def run_in_background( |
859 | 859 | Note that the returned Deferred does not follow the synapse logcontext |
860 | 860 | rules. |
861 | 861 | """ |
862 | | - instance_id = random_string(5) |
| 862 | + instance_id = random_string_insecure_fast(5) |
863 | 863 | calling_context = current_context() |
864 | 864 | logcontext_debug_logger.debug( |
865 | 865 | "run_in_background(%s): called with logcontext=%s", instance_id, calling_context |
@@ -1012,7 +1012,7 @@ def make_deferred_yieldable(deferred: "defer.Deferred[T]") -> "defer.Deferred[T] |
1012 | 1012 | restores the old context once the awaitable completes (execution passes from the |
1013 | 1013 | reactor back to the code). |
1014 | 1014 | """ |
1015 | | - instance_id = random_string(5) |
| 1015 | + instance_id = random_string_insecure_fast(5) |
1016 | 1016 | logcontext_debug_logger.debug( |
1017 | 1017 | "make_deferred_yieldable(%s): called with logcontext=%s", |
1018 | 1018 | instance_id, |
|
0 commit comments