From 69f85683dcf6ce2c20aaa01462c5993534071cf4 Mon Sep 17 00:00:00 2001 From: Ian Paterson Date: Thu, 15 Feb 2007 21:16:54 +0000 Subject: [PATCH] 1.16 RC4 fixed one more potentially right scrolling example git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@583 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0124.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/xep-0124.xml b/xep-0124.xml index 584a44d4..b1fc8d90 100644 --- a/xep-0124.xml +++ b/xep-0124.xml @@ -890,6 +890,7 @@ Content-Length: 68

The cross domain security restrictions of some runtime environments permit clients to access pure XML text only if it was received from a specific server (e.g., the hostname a Web client was downloaded from). Astonishingly the same environments typically permit clients to receive and execute scripts from any server! This security hole is unlikely to be closed by browser vendors since it facilitates online advertising. The Security Considerations section below describes the significant risks of deploying Script Syntax.

To enable domain-restricted clients to use BOSH with any connection manager, this section proposes an optional alternative to the standard "BOSH Pure Syntax" seen in the other sections of this document. The "BOSH Script Syntax" defined here essentially inserts each <body/> element sent by the client into an HTTP GET header instead of into the body of a POST request. Each <body/> element sent by the connection manager is wrapped inside an &ECMAScript; string and function call. No changes to the <body/> element or to any other aspects of the protocol are required.

If, and only if, a client is unable to use the Pure Syntax, then it MAY send a session request to a BOSH connection manager using Script Syntax instead. If the connection manager supports Script Syntax then it MUST send its Session Creation Response using Script Syntax, and all subsequent client requests and connection manager responses within the session MUST be sent using Script Syntax. If the connection manager does not support the "BOSH Script" syntax then it SHOULD return either an 'item-not-found' terminal binding error (in Script Syntax) or an HTTP 404 (Not Found) error in response to the client's session request:

+

Note: The line break in the body of the HTTP response in the following example is included only to improve readability. In practice there MUST be no line breaks.

")]]> +_BOSH_("")]]> @@ -911,13 +913,13 @@ Content-Length: 0]]>
  • The resulting URI MUST be sent to the connection manager within an HTTP GET request.

  • Include extra HTTP headers to prevent request/response caching or storage by any intermediary.

  • -

    Note: Line breaks in the HTTP requests shown in the following examples are not significant and are included only to improve readability.

    +

    Note: All whitespace between "GET " and " HTTP/1.1" in the HTTP GET header lines in the following two examples is included only to improve readability. In practice there MUST be no whitespace.

    GET /webclient?%3Cbody%20rid='1249243562'%20sid='SomeSID'%20 xmlns='http://jabber.org/protocol/httpbind'%3E%3C message%20to='friend@example.com'%20xmlns='jabber:client'%3E%3C - body%3EI%20said%20%22Hi!%22%3C/body%3E%3C/message%3E%3C/body%3E + body%3EI%20said%20%22Hi!%22%3C/body%3E%3C/message%3E%3C/body%3E HTTP/1.1 Host: httpcm.jabber.org Accept-Encoding: gzip, deflate @@ -958,7 +960,7 @@ Content-Length: 0]]>
  • If the client request does not possess a 'content' attribute, then the HTTP Content-Type header of responses MUST be either "text/javascript; charset=utf-8" or "application/x-javascript; charset=utf-8".

  • Include extra HTTP headers to prevent caching or storage by any intermediary.

  • -

    Note: Line breaks in the _BOSH_ code shown in the following examples are not significant and are included only to improve readability.

    +

    Note: All line breaks in the bodies of the HTTP responses in the following two examples is included only to improve readability. In practice there MUST be no line breaks.

    ") ]]> @@ -980,7 +982,7 @@ Cache-Control: no-cache Pragma: no-cache Content-Length: 212 -_BOSH_("\n \n I said \"Hi!\"\n\n")