mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 10:19:22 -05:00
Merge remote-tracking branch 'origin/develop' into dbkr/password_reset_case_insensitive
This commit is contained in:
commit
a7f48320b1
29
CHANGES.rst
29
CHANGES.rst
@ -1,4 +1,31 @@
|
||||
Changes in synapse v0.18.1 (2016-10-0)
|
||||
Changes in synapse v0.18.2-rc1 (2016-10-17)
|
||||
===========================================
|
||||
|
||||
Changes:
|
||||
|
||||
* Remove redundant event_auth index (PR #1113)
|
||||
* Reduce DB hits for replication (PR #1141)
|
||||
* Implement pluggable password auth (PR #1155)
|
||||
* Remove rate limiting from app service senders and fix get_or_create_user
|
||||
requester, thanks to Patrik Oldsberg (PR #1157)
|
||||
* window.postmessage for Interactive Auth fallback (PR #1159)
|
||||
* Use sys.executable instead of hardcoded python, thanks to Pedro Larroy
|
||||
(PR #1162)
|
||||
* Add config option for adding additional TLS fingerprints (PR #1167)
|
||||
* User-interactive auth on delete device (PR #1168)
|
||||
|
||||
|
||||
Bug fixes:
|
||||
|
||||
* Fix not being allowed to set your own state_key, thanks to Patrik Oldsberg
|
||||
(PR #1150)
|
||||
* Fix interactive auth to return 401 from for incorrect password (PR #1160,
|
||||
#1166)
|
||||
* Fix email push notifs being dropped (PR #1169)
|
||||
|
||||
|
||||
|
||||
Changes in synapse v0.18.1 (2016-10-05)
|
||||
======================================
|
||||
|
||||
No changes since v0.18.1-rc1
|
||||
|
@ -16,4 +16,4 @@
|
||||
""" This is a reference implementation of a Matrix home server.
|
||||
"""
|
||||
|
||||
__version__ = "0.18.1"
|
||||
__version__ = "0.18.2-rc1"
|
||||
|
@ -24,7 +24,7 @@ import subprocess
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
SYNAPSE = ["python", "-B", "-m", "synapse.app.homeserver"]
|
||||
SYNAPSE = [sys.executable, "-B", "-m", "synapse.app.homeserver"]
|
||||
|
||||
GREEN = "\x1b[1;32m"
|
||||
RED = "\x1b[1;31m"
|
||||
|
@ -150,6 +150,10 @@ class EmailPusher(object):
|
||||
|
||||
soonest_due_at = None
|
||||
|
||||
if not unprocessed:
|
||||
yield self.save_last_stream_ordering_and_success(self.max_stream_ordering)
|
||||
return
|
||||
|
||||
for push_action in unprocessed:
|
||||
received_at = push_action['received_ts']
|
||||
if received_at is None:
|
||||
|
@ -372,7 +372,7 @@ class Mailer(object):
|
||||
state_event_id = room_state_ids[room_id][
|
||||
("m.room.member", event.sender)
|
||||
]
|
||||
state_event = yield self.get_event(state_event_id)
|
||||
state_event = yield self.store.get_event(state_event_id)
|
||||
sender_name = name_from_member_event(state_event)
|
||||
|
||||
if sender_name is not None and room_name is not None:
|
||||
|
@ -603,7 +603,6 @@ class EventsStore(SQLBaseStore):
|
||||
"rejections",
|
||||
"redactions",
|
||||
"room_memberships",
|
||||
"state_events",
|
||||
"topics"
|
||||
):
|
||||
txn.executemany(
|
||||
|
@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
# Remember to update this number every time a change is made to database
|
||||
# schema files, so the users will be informed on server restarts.
|
||||
SCHEMA_VERSION = 36
|
||||
SCHEMA_VERSION = 37
|
||||
|
||||
dir_path = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
81
synapse/storage/schema/delta/37/remove_auth_idx.py
Normal file
81
synapse/storage/schema/delta/37/remove_auth_idx.py
Normal file
@ -0,0 +1,81 @@
|
||||
# Copyright 2016 OpenMarket Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# 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.
|
||||
|
||||
from synapse.storage.prepare_database import get_statements
|
||||
from synapse.storage.engines import PostgresEngine
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
DROP_INDICES = """
|
||||
-- We only ever query based on event_id
|
||||
DROP INDEX IF EXISTS state_events_room_id;
|
||||
DROP INDEX IF EXISTS state_events_type;
|
||||
DROP INDEX IF EXISTS state_events_state_key;
|
||||
|
||||
-- room_id is indexed elsewhere
|
||||
DROP INDEX IF EXISTS current_state_events_room_id;
|
||||
DROP INDEX IF EXISTS current_state_events_state_key;
|
||||
DROP INDEX IF EXISTS current_state_events_type;
|
||||
|
||||
DROP INDEX IF EXISTS transactions_have_ref;
|
||||
|
||||
-- (topological_ordering, stream_ordering, room_id) seems like a strange index,
|
||||
-- and is used incredibly rarely.
|
||||
DROP INDEX IF EXISTS events_order_topo_stream_room;
|
||||
|
||||
DROP INDEX IF EXISTS event_search_ev_idx;
|
||||
"""
|
||||
|
||||
POSTGRES_DROP_CONSTRAINT = """
|
||||
ALTER TABLE event_auth DROP CONSTRAINT IF EXISTS event_auth_event_id_auth_id_room_id_key;
|
||||
"""
|
||||
|
||||
SQLITE_DROP_CONSTRAINT = """
|
||||
DROP INDEX IF EXISTS evauth_edges_id;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS event_auth_new(
|
||||
event_id TEXT NOT NULL,
|
||||
auth_id TEXT NOT NULL,
|
||||
room_id TEXT NOT NULL
|
||||
);
|
||||
|
||||
INSERT INTO event_auth_new
|
||||
SELECT event_id, auth_id, room_id
|
||||
FROM event_auth;
|
||||
|
||||
DROP TABLE event_auth;
|
||||
|
||||
ALTER TABLE event_auth_new RENAME TO event_auth;
|
||||
|
||||
CREATE INDEX evauth_edges_id ON event_auth(event_id);
|
||||
"""
|
||||
|
||||
|
||||
def run_create(cur, database_engine, *args, **kwargs):
|
||||
for statement in get_statements(DROP_INDICES.splitlines()):
|
||||
cur.execute(statement)
|
||||
|
||||
if isinstance(database_engine, PostgresEngine):
|
||||
drop_constraint = POSTGRES_DROP_CONSTRAINT
|
||||
else:
|
||||
drop_constraint = SQLITE_DROP_CONSTRAINT
|
||||
|
||||
for statement in get_statements(drop_constraint.splitlines()):
|
||||
cur.execute(statement)
|
||||
|
||||
|
||||
def run_upgrade(cur, database_engine, *args, **kwargs):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user