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

Replace ujson with simplejson #3008

Merged
merged 4 commits into from
Mar 16, 2018
Merged

Replace ujson with simplejson #3008

merged 4 commits into from
Mar 16, 2018

Conversation

erikjohnston
Copy link
Member

No description provided.

@@ -56,7 +56,7 @@

def encode_json(json_object):
if USE_FROZEN_DICTS:
# ujson doesn't like frozen_dicts
# simplejson doesn't like frozen_dicts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh, I thought i'd explicitly not changed that :/

@erikjohnston erikjohnston merged commit 0092cf3 into master Mar 16, 2018
krombel added a commit to krombel/synapse that referenced this pull request Mar 22, 2018
Changes in synapse v0.27.0-rc2 (2018-03-19)
===========================================

Pulls in v0.26.1

Bug fixes:

* Fix bug introduced in v0.27.0-rc1 that causes much increased memory
  usage in state cache (PR matrix-org#3005)

Changes in synapse v0.26.1 (2018-03-15)
=======================================

Bug fixes:

* Fix bug where an invalid event caused server to stop functioning
  correctly, due to parsing and serializing bugs in ujson library
  (PR matrix-org#3008)
@richvdh richvdh changed the title Hotfixes v0.26.1 Replace ujson with simplejson Mar 27, 2018
@richvdh
Copy link
Member

richvdh commented Aug 30, 2018

For the record:

The problem here was that somebody sent an event with a long long int in it. Contrary to what is specified in Canonical JSON, we do not in fact check the size of any ints beng encoded, so the signature on the event was accepted regardless.

Then, when we came to encode the event for sending out over /sync, ujson generated some invalid JSON.

@hawkowl hawkowl deleted the hotfixes-v0.26.1 branch September 20, 2018 14:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants