1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

r20723: Web Application Framework

- Clearly no one has ever tried to obtain the Referer from the web server
  before. :-)

- Send the Referer from the web application, in preparation for later security
  updates.  (These updates are not immediately necessary, as ScriptTransport
  is disabled and we check the content type on XmlHttpTransport.  This isn't
  anything to worry about.)
(This used to be commit 33c07f4b92ac349af85dff11e24111fb16d201d0)
This commit is contained in:
Derrell Lipman 2007-01-13 02:27:54 +00:00 committed by Gerald (Jerry) Carter
parent 007c6f6e65
commit 2c5a1e6bdd
2 changed files with 5 additions and 2 deletions

View File

@ -456,7 +456,7 @@ static void http_setup_arrays(struct esp_state *esp)
}
SETVAR(ESP_REQUEST_OBJ, "COOKIE_SUPPORT", web->input.cookie?"True":"False");
SETVAR(ESP_HEADERS_OBJ, "HTT_REFERER", web->input.referer);
SETVAR(ESP_HEADERS_OBJ, "HTTP_REFERER", web->input.referer);
SETVAR(ESP_HEADERS_OBJ, "HOST", web->input.host);
SETVAR(ESP_HEADERS_OBJ, "ACCEPT_ENCODING", web->input.accept_encoding);
SETVAR(ESP_HEADERS_OBJ, "ACCEPT_LANGUAGE", web->input.accept_language);

View File

@ -310,9 +310,12 @@ qx.Proto.send = function()
// --------------------------------------
// Appliying request header
// Applying request header
// --------------------------------------
// Add a Referer header
vRequest.setRequestHeader('Referer', window.location.href);
var vRequestHeaders = this.getRequestHeaders();
for (var vId in vRequestHeaders) {
vRequest.setRequestHeader(vId, vRequestHeaders[vId]);