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

Fix handling of "off" in encryption_enabled_by_default_for_room_type #7822

Merged
merged 2 commits into from
Jul 13, 2020

Commits on Jul 11, 2020

  1. Fix handling of "off" in encryption_enabled_by_default_for_room_type

    Fixes #7821, introduced in #7639
    
    Turns out PyYAML translates `off` into a `False` boolean if it's
    unquoted (see https://stackoverflow.com/questions/36463531/pyyaml-automatically-converting-certain-keys-to-boolean-values),
    which seems to be a liberal interpretation of this bit of the YAML spec: https://yaml.org/spec/1.1/current.html#id864510
    
    An alternative fix would be to implement the solution mentioned in the
    SO post linked above, but I'm aware it might break existing setups
    (which might use these values in the configuration file) so it's
    probably better just to add an extra check for this one. We should be
    aware that this is a thing for the next times we do that though.
    
    I didn't find any other occurrence of this bug elsewhere in the
    codebase.
    babolivier committed Jul 11, 2020
    Configuration menu
    Copy the full SHA
    f340259 View commit details
    Browse the repository at this point in the history
  2. Explicitely test for False

    babolivier committed Jul 11, 2020
    Configuration menu
    Copy the full SHA
    68a25ed View commit details
    Browse the repository at this point in the history