{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/comments/227339447","pull_request_review_id":167323463,"id":227339447,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzMzOTQ0Nw==","diff_hunk":"@@ -570,6 +570,105 @@ transaction request to be responded to with an error response.\n     result in the user being considered joined.\n \n \n+Soft failure\n+++++++++++++\n+\n+Motivation\n+^^^^^^^^^^\n+\n+If a user is banned from a room a server can still send events from them by only\n+referencing events from before the ban. This allows fairly simple ban evasion.\n+(This can also be abused when a user loses other privileges, like power levels,\n+etc).\n+\n+When this happens it is often fairly obvious to servers, as they can see that\n+the new event doesn't actually pass auth based on the \"current state\" (i.e. the\n+resolved state across all forward extremities). While the event is technically\n+valid, the server can choose to not notify clients about the new event.\n+\n+This discourages servers from sending events that evade bans etc. in this way,\n+as end users won't actually see the events.\n+\n+Implementation\n+^^^^^^^^^^^^^^\n+\n+When the homeserver receives a new event over federation it should also check\n+whether the event passes auth checks based on the current state of the room (as\n+well as based on the state at the event). If the event does not pass the auth\n+checks based on the current state of the room (but does pass the auth checks\n+based on the state at that event) it should be \"soft failed\".\n+\n+When an event is \"soft failed\" it should not be relayed to the client nor be\n+referenced by new events created by the homeserver.\n+\n+.. NOTE::\n+\n+    If an event is received that references the soft failed event then the new event\n+    should be handled as usual. Soft failed state events participate in state\n+    resolution, and so can appear in the state of events that reference the soft\n+    failed state event. This can result in soft-failed events appearing in the state\n+    of allowed events, in which case the client should be told about the soft failed\n+    event in the usual way (e.g. by sending it down in the ``state`` section of a\n+    sync response).\n+\n+    A soft failed event should be returned in response to federation requests\n+    where appropriate (e.g. in ``/event/<event_id>``). Note that soft failed events\n+    are returned in ``/backfill`` and ``/get_missing_events`` responses only if the\n+    requests include events referencing the soft failed events.\n+\n+\n+Worked Examples\n+^^^^^^^^^^^^^^^\n+\n+As an example consider the event graph::\n+\n+      A\n+     /\n+    B\n+\n+Where ``B`` is a ban of a user ``X``. If the user ``X`` tries to set the topic\n+by sending an event ``C`` while evading the ban::\n+\n+      A\n+     / \\\n+    B   C\n+\n+Servers that receive ``C`` after ``B`` will soft fail event ``C``, and so will","path":"specification/server_server_api.rst","position":67,"original_position":67,"commit_id":"0d9b882f0124e73d168fd878dcdceccc70a0fc96","original_commit_id":"0d9b882f0124e73d168fd878dcdceccc70a0fc96","user":{"login":"richvdh","id":1389908,"node_id":"MDQ6VXNlcjEzODk5MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/1389908?v=4","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"body":"s/will soft fail/should soft fail/, maybe","created_at":"2018-10-23T11:07:18Z","updated_at":"2018-10-23T11:09:08Z","html_url":"https://github.com/matrix-org/matrix-doc/pull/1641#discussion_r227339447","pull_request_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/comments/227339447"},"html":{"href":"https://github.com/matrix-org/matrix-doc/pull/1641#discussion_r227339447"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641"}},"in_reply_to_id":227331425},"pull_request":{"url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641","id":212411296,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNDExMjk2","html_url":"https://github.com/matrix-org/matrix-doc/pull/1641","diff_url":"https://github.com/matrix-org/matrix-doc/pull/1641.diff","patch_url":"https://github.com/matrix-org/matrix-doc/pull/1641.patch","issue_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/1641","number":1641,"state":"open","locked":false,"title":"Initial stab at documenting soft fail","user":{"login":"erikjohnston","id":8428120,"node_id":"MDQ6VXNlcjg0MjgxMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/8428120?v=4","gravatar_id":"","url":"https://api.github.com/users/erikjohnston","html_url":"https://github.com/erikjohnston","followers_url":"https://api.github.com/users/erikjohnston/followers","following_url":"https://api.github.com/users/erikjohnston/following{/other_user}","gists_url":"https://api.github.com/users/erikjohnston/gists{/gist_id}","starred_url":"https://api.github.com/users/erikjohnston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikjohnston/subscriptions","organizations_url":"https://api.github.com/users/erikjohnston/orgs","repos_url":"https://api.github.com/users/erikjohnston/repos","events_url":"https://api.github.com/users/erikjohnston/events{/privacy}","received_events_url":"https://api.github.com/users/erikjohnston/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-31T15:01:54Z","updated_at":"2018-10-23T11:09:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fb782206f0a0b5f39909647eb6534862522b688","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":470773672,"node_id":"MDU6TGFiZWw0NzA3NzM2NzI=","url":"https://api.github.com/repos/matrix-org/matrix-doc/labels/p1","name":"p1","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641/commits","review_comments_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641/comments","review_comment_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/1641/comments","statuses_url":"https://api.github.com/repos/matrix-org/matrix-doc/statuses/0d9b882f0124e73d168fd878dcdceccc70a0fc96","head":{"label":"matrix-org:erikj/soft_fail","ref":"erikj/soft_fail","sha":"0d9b882f0124e73d168fd878dcdceccc70a0fc96","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24998719,"node_id":"MDEwOlJlcG9zaXRvcnkyNDk5ODcxOQ==","name":"matrix-doc","full_name":"matrix-org/matrix-doc","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/matrix-doc","description":"Matrix Documentation (including The Spec)","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-doc","forks_url":"https://api.github.com/repos/matrix-org/matrix-doc/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-doc/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-doc/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-doc/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-doc/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-doc/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-doc/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-doc/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-doc/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-doc/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-doc/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-doc/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-doc/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-doc/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-doc/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-doc/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-doc/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/matrix-doc/deployments","created_at":"2014-10-09T16:41:02Z","updated_at":"2018-10-20T05:09:05Z","pushed_at":"2018-10-22T16:05:21Z","git_url":"git://github.com/matrix-org/matrix-doc.git","ssh_url":"git@github.com:matrix-org/matrix-doc.git","clone_url":"https://github.com/matrix-org/matrix-doc.git","svn_url":"https://github.com/matrix-org/matrix-doc","homepage":null,"size":8540,"stargazers_count":169,"watchers_count":169,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":84,"mirror_url":null,"archived":false,"open_issues_count":513,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":84,"open_issues":513,"watchers":169,"default_branch":"master"}},"base":{"label":"matrix-org:master","ref":"master","sha":"136ba15eb2da77fe4a800fc9a94b0cbd986d58ba","user":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24998719,"node_id":"MDEwOlJlcG9zaXRvcnkyNDk5ODcxOQ==","name":"matrix-doc","full_name":"matrix-org/matrix-doc","private":false,"owner":{"login":"matrix-org","id":8418310,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg0MTgzMTA=","avatar_url":"https://avatars2.githubusercontent.com/u/8418310?v=4","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/matrix-org/matrix-doc","description":"Matrix Documentation (including The Spec)","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-doc","forks_url":"https://api.github.com/repos/matrix-org/matrix-doc/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-doc/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-doc/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-doc/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-doc/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-doc/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-doc/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-doc/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-doc/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-doc/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-doc/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-doc/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-doc/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-doc/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-doc/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-doc/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-doc/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-doc/releases{/id}","deployments_url":"https://api.github.com/repos/matrix-org/matrix-doc/deployments","created_at":"2014-10-09T16:41:02Z","updated_at":"2018-10-20T05:09:05Z","pushed_at":"2018-10-22T16:05:21Z","git_url":"git://github.com/matrix-org/matrix-doc.git","ssh_url":"git@github.com:matrix-org/matrix-doc.git","clone_url":"https://github.com/matrix-org/matrix-doc.git","svn_url":"https://github.com/matrix-org/matrix-doc","homepage":null,"size":8540,"stargazers_count":169,"watchers_count":169,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":84,"mirror_url":null,"archived":false,"open_issues_count":513,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":84,"open_issues":513,"watchers":169,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641"},"html":{"href":"https://github.com/matrix-org/matrix-doc/pull/1641"},"issue":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/issues/1641"},"comments":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/issues/1641/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/pulls/1641/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/matrix-doc/statuses/0d9b882f0124e73d168fd878dcdceccc70a0fc96"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"richvdh"}}