mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-31 20:58:40 -04:00
Ensure that calls to json.dumps
are compatible with the standard library json. (#7836)
This commit is contained in:
parent
a57df9b827
commit
35450519de
8 changed files with 22 additions and 13 deletions
|
@ -12,6 +12,7 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from canonicaljson import json
|
||||
|
@ -117,7 +118,7 @@ class RecaptchaAuthChecker(UserInteractiveAuthChecker):
|
|||
except PartialDownloadError as pde:
|
||||
# Twisted is silly
|
||||
data = pde.response
|
||||
resp_body = json.loads(data)
|
||||
resp_body = json.loads(data.decode("utf-8"))
|
||||
|
||||
if "success" in resp_body:
|
||||
# Note that we do NOT check the hostname here: we explicitly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue