mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 07:25:05 -04:00
Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)
This commit is contained in:
parent
d9e47af617
commit
66a4af8d96
7 changed files with 17 additions and 28 deletions
|
@ -14,10 +14,10 @@
|
|||
# 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 json
|
||||
import logging
|
||||
from typing import Any, Callable, Dict, List, Match, Optional, Tuple, Union
|
||||
|
||||
from canonicaljson import json
|
||||
from prometheus_client import Counter, Histogram
|
||||
|
||||
from twisted.internet import defer
|
||||
|
@ -526,9 +526,9 @@ class FederationServer(FederationBase):
|
|||
json_result = {} # type: Dict[str, Dict[str, dict]]
|
||||
for user_id, device_keys in results.items():
|
||||
for device_id, keys in device_keys.items():
|
||||
for key_id, json_bytes in keys.items():
|
||||
for key_id, json_str in keys.items():
|
||||
json_result.setdefault(user_id, {})[device_id] = {
|
||||
key_id: json.loads(json_bytes)
|
||||
key_id: json.loads(json_str)
|
||||
}
|
||||
|
||||
logger.info(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue