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

Fix handling of config tri-state bool values (like acl_public) #940

Merged
merged 1 commit into from
Mar 3, 2018

Commits on Dec 9, 2017

  1. Fix handling of config tri-state bool values (like acl_public)

    Commit bc38c2a added the ability to set
    acl_public from the config file -- but it did not take into account that
    it is a 'tri-state' value so the string is what is written, causing it
    to ALWAYS be true.
    
    This results in unexpected and insecure behavior if 'acl_public = False'
    is used in the config file.
    
    This patch modifies the Config.update_option to check the option type
    AND the value if the original is None. If an option's default is None
    and the value is a bool (true, false, yes, no, 0, 1) then it will set it
    to a bool value.
    bcl committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    618d357 View commit details
    Browse the repository at this point in the history