Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

During config parsing, when federation_certificate_verification_whitelist is specified as an empty value, the server crashes #6817

Closed
SaraSmiseth opened this issue Jan 31, 2020 · 3 comments · Fixed by #6849
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@SaraSmiseth
Copy link

Description

During config parsing, when federation_certificate_verification_whitelist is specified as an empty value, the server crashes.

Ideally the empty value would be interpreted as [] and continue merrily along.

This is the same bug as #4550 just for federation_certificate_verification_whitelist.

Steps to reproduce

  • Configure synapse with the line:
    federation_certificate_verification_whitelist:
  • Start server
  • server crashes
synapse_1   | Traceback (most recent call last):
synapse_1   |   File "/usr/local/lib/python3.8/runpy.py", line 192, in _run_module_as_main
synapse_1   |     return _run_code(code, main_globals, None,
synapse_1   |   File "/usr/local/lib/python3.8/runpy.py", line 85, in _run_code
synapse_1   |     exec(code, run_globals)
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/app/homeserver.py", line 639, in <module>
synapse_1   |     main()
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/app/homeserver.py", line 634, in main
synapse_1   |     hs = setup(sys.argv[1:])
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/app/homeserver.py", line 318, in setup
synapse_1   |     config = HomeServerConfig.load_or_generate_config(
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/config/_base.py", line 616, in load_or_generate_config
synapse_1   |     obj.parse_config_dict(
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/config/_base.py", line 635, in parse_config_dict
synapse_1   |     self.invoke_all(
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/config/_base.py", line 254, in invoke_all
synapse_1   |     res[name] = getattr(config, func_name)(*args, **kwargs)
synapse_1   |   File "/usr/local/lib/python3.8/site-packages/synapse/config/tls.py", line 115, in read_config
synapse_1   |     for entry in fed_whitelist_entries:
synapse_1   | TypeError: 'NoneType' object is not iterable

Version information

  • Homeserver:

If not matrix.org:

  • Version:v1.9.1

  • Install method: docker-compose build from source

  • Platform: raspberry pi 4

@richvdh
Copy link
Member

richvdh commented Jan 31, 2020

Thanks for the clear bug report!

@richvdh richvdh added z-bug (Deprecated Label) good first issue z-p2 (Deprecated Label) labels Jan 31, 2020
@ghost
Copy link

ghost commented Feb 4, 2020

Hi, I'd like to pick this as a first issue!

@richvdh
Copy link
Member

richvdh commented Feb 4, 2020

@timfi : great! I suggest joining #synapse-dev:matrix.org where we can help get you started if you need a hand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants