{"action":"created","comment":{"url":"https://api.github.com/repos/ably/docs/pulls/comments/89503821","pull_request_review_id":10048927,"id":89503821,"diff_hunk":"@@ -107,6 +107,7 @@ h3(#rest-auth). Auth\n *** @(RSA4c1)@An @ErrorInfo@ with @code@ @80019@ and description of the underlying failure should be emitted with the state change, in the @errorReason@ and/or in the callback as appropriate\n *** @(RSA4c2)@If the connection is @CONNECTING@, then the connection attempt should be treated as unsuccessful, and as such the connection should transition to the @DISCONNECTED@ or @SUSPENDED@ state as defined in \"RTN14\":#RTN14 and \"RTN15\":#RTN15\n *** @(RSA4c3)@If the connection is @CONNECTED@, then the connection should remain @CONNECTED@\n+** @(RSA4d)@ If an attempt to authenticate is made using the @authUrl@ and the content type is neither text nor JSON, or if using @authCallback@ and the object passed in is neither a @String@, @JsonObject@, @TokenRequest@ object nor a @TokenDetails@ object, the auth attempt should fail with error code @40143@ and a suitable error message.  Additionally, if the text token string is greater than 384 bytes, or the JSON stringified @JsonObject@, @TokenRequest@ or @TokenDetails@ is greater than 128kb, then the auth attempt should fail with error code @40143@ and a suitable error message.","path":"content/client-lib-development-guide/features.textile","position":4,"original_position":4,"commit_id":"8df7932186a1192d0d989c02db9ab28c6ca082d2","original_commit_id":"8df7932186a1192d0d989c02db9ab28c6ca082d2","user":{"login":"SimonWoolf","id":5908687,"avatar_url":"https://avatars.githubusercontent.com/u/5908687?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonWoolf","html_url":"https://github.com/SimonWoolf","followers_url":"https://api.github.com/users/SimonWoolf/followers","following_url":"https://api.github.com/users/SimonWoolf/following{/other_user}","gists_url":"https://api.github.com/users/SimonWoolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonWoolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonWoolf/subscriptions","organizations_url":"https://api.github.com/users/SimonWoolf/orgs","repos_url":"https://api.github.com/users/SimonWoolf/repos","events_url":"https://api.github.com/users/SimonWoolf/events{/privacy}","received_events_url":"https://api.github.com/users/SimonWoolf/received_events","type":"User","site_admin":false},"body":"> Because of a problem we've seen recently whereby a 500kb payload was sent to Ably\r\n\r\nI follow that, I just meant that in all of those problems are random html getting treated as a token string, not random json getting treated as a token details, because that shouldn't happen - it wouldn't get detected as one. So not sure that's needed. But shrug, I don't mind it if you think it's needed, so sure.\r\n\r\n> The spec item is not describing token failure conditions, it is instead describing side effects of a failure.\r\n\r\nTrue, but we want it to be clear that 4c side-effects *do* apply to the failure in this PR. The way it's phrased in this PR makes it seem like an unrelated requirement. Especially as your new 4d also describes side-effects of the failure, which kinda clash with 4c.\r\n\r\nSo eg if you wanted to keep this at 4d, you could modify 4c to say \"the provided token is in an invalid format **(per RSA4d)**, or ...\", then have `(RSA4d) The following conditions imply that a token is in an invalid format: the content-type of the response from @authUrl@ is neither @text/plain@ or @application/json@; the object returned by @authCallback@ is not a @String@, @TokenRequest@ object, or @TokenDetails@ object; or if the text token string is greater than 384 bytes, or the JSON stringified @JsonObject@, @TokenRequest@ or @TokenDetails@ is greater than 128kb.`","created_at":"2016-11-24T14:12:50Z","updated_at":"2016-11-24T14:12:50Z","html_url":"https://github.com/ably/docs/pull/206#discussion_r89503821","pull_request_url":"https://api.github.com/repos/ably/docs/pulls/206","_links":{"self":{"href":"https://api.github.com/repos/ably/docs/pulls/comments/89503821"},"html":{"href":"https://github.com/ably/docs/pull/206#discussion_r89503821"},"pull_request":{"href":"https://api.github.com/repos/ably/docs/pulls/206"}}},"pull_request":{"url":"https://api.github.com/repos/ably/docs/pulls/206","id":95173700,"html_url":"https://github.com/ably/docs/pull/206","diff_url":"https://github.com/ably/docs/pull/206.diff","patch_url":"https://github.com/ably/docs/pull/206.patch","issue_url":"https://api.github.com/repos/ably/docs/issues/206","number":206,"state":"open","locked":false,"title":"spec: Reject invalid authCallback / authUrl content","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"body":"We have seen authUrl retrieving HTML files greater than 500kb in size which should have been rejected due to the content type, but also because of the size.\r\n\r\n@SimonWoolf @paddybyers @tcard please review","created_at":"2016-11-24T12:54:03Z","updated_at":"2016-11-24T14:12:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4028399f6d95c2ac82e26de336e35c95e0f424ef","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ably/docs/pulls/206/commits","review_comments_url":"https://api.github.com/repos/ably/docs/pulls/206/comments","review_comment_url":"https://api.github.com/repos/ably/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/docs/issues/206/comments","statuses_url":"https://api.github.com/repos/ably/docs/statuses/8df7932186a1192d0d989c02db9ab28c6ca082d2","head":{"label":"ably:validate-auth-url-response","ref":"validate-auth-url-response","sha":"8df7932186a1192d0d989c02db9ab28c6ca082d2","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":7221949,"name":"docs","full_name":"ably/docs","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/docs","description":"Ably API documentation ","fork":false,"url":"https://api.github.com/repos/ably/docs","forks_url":"https://api.github.com/repos/ably/docs/forks","keys_url":"https://api.github.com/repos/ably/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/docs/teams","hooks_url":"https://api.github.com/repos/ably/docs/hooks","issue_events_url":"https://api.github.com/repos/ably/docs/issues/events{/number}","events_url":"https://api.github.com/repos/ably/docs/events","assignees_url":"https://api.github.com/repos/ably/docs/assignees{/user}","branches_url":"https://api.github.com/repos/ably/docs/branches{/branch}","tags_url":"https://api.github.com/repos/ably/docs/tags","blobs_url":"https://api.github.com/repos/ably/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/docs/languages","stargazers_url":"https://api.github.com/repos/ably/docs/stargazers","contributors_url":"https://api.github.com/repos/ably/docs/contributors","subscribers_url":"https://api.github.com/repos/ably/docs/subscribers","subscription_url":"https://api.github.com/repos/ably/docs/subscription","commits_url":"https://api.github.com/repos/ably/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/docs/contents/{+path}","compare_url":"https://api.github.com/repos/ably/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/docs/merges","archive_url":"https://api.github.com/repos/ably/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/docs/downloads","issues_url":"https://api.github.com/repos/ably/docs/issues{/number}","pulls_url":"https://api.github.com/repos/ably/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/docs/labels{/name}","releases_url":"https://api.github.com/repos/ably/docs/releases{/id}","deployments_url":"https://api.github.com/repos/ably/docs/deployments","created_at":"2012-12-18T10:59:49Z","updated_at":"2016-11-07T07:07:06Z","pushed_at":"2016-11-24T12:54:04Z","git_url":"git://github.com/ably/docs.git","ssh_url":"git@github.com:ably/docs.git","clone_url":"https://github.com/ably/docs.git","svn_url":"https://github.com/ably/docs","homepage":null,"size":14057,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":48,"forks":12,"open_issues":48,"watchers":1,"default_branch":"source"}},"base":{"label":"ably:source","ref":"source","sha":"c0dfafd7096cc83b956b98859e11fea21de58f60","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":7221949,"name":"docs","full_name":"ably/docs","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/docs","description":"Ably API documentation ","fork":false,"url":"https://api.github.com/repos/ably/docs","forks_url":"https://api.github.com/repos/ably/docs/forks","keys_url":"https://api.github.com/repos/ably/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/docs/teams","hooks_url":"https://api.github.com/repos/ably/docs/hooks","issue_events_url":"https://api.github.com/repos/ably/docs/issues/events{/number}","events_url":"https://api.github.com/repos/ably/docs/events","assignees_url":"https://api.github.com/repos/ably/docs/assignees{/user}","branches_url":"https://api.github.com/repos/ably/docs/branches{/branch}","tags_url":"https://api.github.com/repos/ably/docs/tags","blobs_url":"https://api.github.com/repos/ably/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/docs/languages","stargazers_url":"https://api.github.com/repos/ably/docs/stargazers","contributors_url":"https://api.github.com/repos/ably/docs/contributors","subscribers_url":"https://api.github.com/repos/ably/docs/subscribers","subscription_url":"https://api.github.com/repos/ably/docs/subscription","commits_url":"https://api.github.com/repos/ably/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/docs/contents/{+path}","compare_url":"https://api.github.com/repos/ably/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/docs/merges","archive_url":"https://api.github.com/repos/ably/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/docs/downloads","issues_url":"https://api.github.com/repos/ably/docs/issues{/number}","pulls_url":"https://api.github.com/repos/ably/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/docs/labels{/name}","releases_url":"https://api.github.com/repos/ably/docs/releases{/id}","deployments_url":"https://api.github.com/repos/ably/docs/deployments","created_at":"2012-12-18T10:59:49Z","updated_at":"2016-11-07T07:07:06Z","pushed_at":"2016-11-24T12:54:04Z","git_url":"git://github.com/ably/docs.git","ssh_url":"git@github.com:ably/docs.git","clone_url":"https://github.com/ably/docs.git","svn_url":"https://github.com/ably/docs","homepage":null,"size":14057,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":48,"forks":12,"open_issues":48,"watchers":1,"default_branch":"source"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/docs/pulls/206"},"html":{"href":"https://github.com/ably/docs/pull/206"},"issue":{"href":"https://api.github.com/repos/ably/docs/issues/206"},"comments":{"href":"https://api.github.com/repos/ably/docs/issues/206/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/docs/pulls/206/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/docs/pulls/206/commits"},"statuses":{"href":"https://api.github.com/repos/ably/docs/statuses/8df7932186a1192d0d989c02db9ab28c6ca082d2"}}}}
{"actor":{"display_login":"SimonWoolf"}}