api: Fix encoding of strings in realm endpoint.

* Don't require strings to be unnecessarily JSON-encoded.
* Use check_capped_string rather than custom code for length checks.
* Update frontend to pass the right parameters.

With a much simplified populate_data_for_request design suggested by
Anders; we only support a handful of data types, all of which are
correctly encoded automatically by jQuery.

Fixes part of #18035.
This commit is contained in:
Tim Abbott
2021-04-07 13:00:40 -07:00
committed by Tim Abbott
parent 7947de5cd1
commit cdbcb43706
7 changed files with 38 additions and 28 deletions

View File

@@ -30,7 +30,7 @@ DESKTOP_WARNING_VERSION = "5.2.0"
#
# Changes should be accompanied by documentation explaining what the
# new level means in templates/zerver/api/changelog.md.
API_FEATURE_LEVEL = 51
API_FEATURE_LEVEL = 52
# Bump the minor PROVISION_VERSION to indicate that folks should provision
# only when going from an old version of the code to a newer version. Bump