4979: rb-site manage set-siteconfig with wrong value crash the server with no (easy) restore options.

lmarecha

What version are you running?

4.0.10

What's the URL of the page containing the problem?

-

What steps will reproduce the problem?

  1. Use rb-site to set a configuration, if the configuration is not recognized or invalid it will still accept it, but the server crash and it cannot be changed after (no access to web ui, and rb-site itself crash)
  2. Example with timezone (with invalid value GMT+1): rb-site manage /versionvault_data/reviewboard set-siteconfig --key "locale_timezone" --value "GMT+1"
  3. It does accept it, but server is taking a nap and rb-site report that the value is invalid AFTER it was accepted, when you want to change it back.

What is the expected output? What do you see instead?

For non free test field, I would expect a verification and an error if the value is not a valid one. Or that rb-site allow to overwrite the invalid setting without crashing.

What operating system are you using? What browser?

Linux Ubuntu/Python 3.8

Please provide any additional information below.

To fix the situation, I had to edit the db directly. Using rb-site or scripting with django (siteconfig = SiteConfiguration.objects.get_current() and siteconfig.set('locale_timezone', 'GMT')) both fails.