Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
3 anos atrás
Patrick Cloke
1c9a850562
Add type hints to the crypto module. ( #8999 )
3 anos atrás
Patrick Cloke
06eb5cae08
Remove special auth and redaction rules for aliases events in experimental room ver. ( #7037 )
4 anos atrás
Richard van der Hoff
7f93eb1903
pass room_version into compute_event_signature ( #6807 )
4 anos atrás
Richard van der Hoff
2a81393a4b
Pass room_version into add_hashes_and_signatures
4 anos atrás
Richard van der Hoff
ba897a7590
Fix some test failures when frozen_dicts are enabled ( #6642 )
Fixes #4026
4 anos atrás
Michael Kaye
f85b9842f0
Don't encode object as UTF-8 string if not needed.
I believe that string formatting ~10-15 sized events will
take a proportion of CPU time.
4 anos atrás
Andrew Morgan
4548d1f87e
Remove unnecessary parentheses around return statements ( #5931 )
Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :)
4 anos atrás
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
4 anos atrás
Richard van der Hoff
2615c6bd9e
Clean up debug logging ( #5347 )
Remove some spurious stuff, clarify some other stuff
5 anos atrás
Erik Johnston
554ca58ea1
Make add_hashes_and_signatures operate on dicts
5 anos atrás
Erik Johnston
855a151015
Refactor event signing to work on dicts
This is in preparation for making EventBuilder format agnostic, which
means event signing should be done against the event dict rather than
the EventBuilder object.
5 anos atrás
Amber Brown
49af402019
run isort
5 anos atrás
Richard van der Hoff
7303ed65e1
Fix 500 when joining matrix-dev
matrix-dev has an event (`$/6ANj/9QWQyd71N6DpRQPf+SDUu11+HVMeKSpMzBCwM:zemos.net`)
which has no `hashes` member.
Check for missing `hashes` element in events.
6 anos atrás
Richard van der Hoff
eaaabc6c4f
replace 'except:' with 'except Exception:'
what could possibly go wrong
6 anos atrás
Matthew Hodgson
6c28ac260c
copyrights
8 anos atrás
Mark Haines
78323ccdb3
Remove syutil dependency in favour of smaller single-purpose libraries
8 anos atrás
Mark Haines
adb04b1e57
Update copyright notices
9 anos atrás
Erik Johnston
95aa903ffa
Try and figure out how and why signatures are being changed.
9 anos atrás
Erik Johnston
609c31e8df
More bug fixes
9 anos atrás
Erik Johnston
c31dba86ec
Convert rest and handlers to use new event structure
9 anos atrás
Erik Johnston
75b4329aaa
WIP for new way of managing events.
9 anos atrás
Mark Haines
dfdda2c871
Use module loggers rather than the root logger. Exceptions caused by bad clients shouldn't cause ERROR level logging. Fix sql logging to use 'repr' rather than 'str'
9 anos atrás
Mark Haines
cb4b6c844a
Merge PDUs and Events into one object
9 anos atrás
Mark Haines
8c2b5ea7c4
Fix PDU and event signatures
9 anos atrás
Mark Haines
de1ec90133
Validate signatures on incoming events
9 anos atrás
Erik Johnston
6cb6cb9e69
Tidy up some of the unused sql tables
9 anos atrás
Erik Johnston
1c06806f90
Finish redaction algorithm.
9 anos atrás
Erik Johnston
97a096b507
Add hash of current state to events
9 anos atrás
Erik Johnston
68698e0ac8
Fix bugs in generating event signatures and hashing
9 anos atrás
Erik Johnston
82a6b83524
Don't assume event has hashes key already
9 anos atrás
Erik Johnston
ecabff7eb4
Sign evnets
9 anos atrás
Erik Johnston
d30d79b5be
Make prev_event signing work again.
9 anos atrás
Mark Haines
5e2236f9ff
fix pyflakes warnings
9 anos atrás
Mark Haines
8afbece683
Remove signatures from pdu when computing hashes to use for prev pdus, make sure is_state is a boolean.
9 anos atrás
Mark Haines
c5cec1cc77
Rename 'meta' to 'unsigned'
9 anos atrás
Mark Haines
c8f996e29f
Hash the same content covered by the signature when referencing previous PDUs rather than reusing the PDU content hashes
9 anos atrás
Mark Haines
66104da10c
Sign outgoing PDUs.
9 anos atrás
Mark Haines
1c445f88f6
persist hashes and origin signatures for PDUs
9 anos atrás