Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inverted logic in configuration merge #585

Closed
schroedingersZombie opened this issue Jan 7, 2024 · 3 comments · Fixed by #590
Closed

Inverted logic in configuration merge #585

schroedingersZombie opened this issue Jan 7, 2024 · 3 comments · Fixed by #590

Comments

@schroedingersZombie
Copy link

In sydent/config/init.py is an inversion of logic.
In line 229 and following, the default config is populated into the config object. The comment indicates, that if a config file exists, all default configs should go into the DEFAULT section. With the current logic all default values go into their specific sections, when the config file exists, overriding all DEFAULT section settings made in the config file.
This same bug also causes the generated config file to have (almost) all options in the DEFAULT section.

The fix is to remove the "not" in line 229, as I've done in my fork https://github.com/matrix-org/sydent/compare/main...schroedingersZombie:fix-inverted-config-merge?expand=1

Unfortunately Matrix Organisations Contribution Guidelines are (possibly unintentionally) transphobic. As I will not give my legal name, I'm barred from contributing code.

@reivilibre
Copy link
Contributor

As I will not give my legal name, I'm barred from contributing code.

just as a note about this point:

We accept contributions under a legally identifiable name, such as your name on government documentation or common-law names (names claimed by legitimate usage or repute). Unfortunately, we cannot accept anonymous contributions at this time.

@schroedingersZombie
Copy link
Author

I don't have any idea what a common-law name is. As I'm not from a common-law country (as most countries) do I don't think this can apply to me.

@anoadragon453
Copy link
Member

Thanks for reporting and for your detailed description. I've filed a PR at #590 to fix this (and updated the comment to be a bit more helpful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants