diff options
| author | Scott Gasch <[email protected]> | 2022-08-17 12:01:26 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2022-08-17 12:01:26 -0700 |
| commit | 4c74ef100038a239bae9b4fd4d61fb04f5b391b4 (patch) | |
| tree | bb3a63141c7f544c3ff796cdef7a464d3a62e73d /config.py | |
| parent | 2966ecdb8c49266d491a1f75791868920d68a510 (diff) | |
Do not allow data that is too large in zookeeper.
Diffstat (limited to 'config.py')
| -rw-r--r-- | config.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -393,6 +393,9 @@ def _augment_sys_argv_from_loadfile(): newargs = [ arg.strip('\n') for arg in contents.split('\n') if 'config_savefile' not in arg ] + size = sys.getsizeof(newargs) + if size > 1024 * 1024: + raise Exception(f'Saved args are too large! ({size} bytes)') except Exception as e: raise Exception(f'Error reading {zkpath} from zookeeper.') from e SAVED_MESSAGES.append(f'Loaded config from zookeeper from {zkpath}') |
