From da00abb432ebcd330bad541877bea0376d158fa2 Mon Sep 17 00:00:00 2001 From: Christopher Kramer Date: Tue, 23 Apr 2019 20:36:18 +0200 Subject: [PATCH] Charset in WebDAV requests was 'utf8', but should be 'utf-8'. Otherwise this is an invalid charset which e.g. gets blocked by modsecurity rule 920480 "Request content type charset is not allowed by policy". --- chrome/content/inverse-library/sogoWebDAV.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/inverse-library/sogoWebDAV.js b/chrome/content/inverse-library/sogoWebDAV.js index 3032cf3..bf55f87 100644 --- a/chrome/content/inverse-library/sogoWebDAV.js +++ b/chrome/content/inverse-library/sogoWebDAV.js @@ -370,7 +370,7 @@ sogoWebDAV.prototype = { else if (operation == "PROPFIND") { let headers = { "depth": (parameters.deep ? "1": "0"), - "content-type": "application/xml; charset=utf8" }; + "content-type": "application/xml; charset=utf-8" }; let query = this._propfindQuery(parameters.props); this._sendHTTPRequest(operation, query, headers); } @@ -379,7 +379,7 @@ sogoWebDAV.prototype = { ? "1": "0"), "Connection": "TE", "TE": "trailers", - "content-type": "application/xml; charset=utf8" }; + "content-type": "application/xml; charset=utf-8" }; this._sendHTTPRequest(operation, parameters.query, headers); } else if (operation == "MKCOL") { @@ -389,7 +389,7 @@ sogoWebDAV.prototype = { this._sendHTTPRequest(operation, parameters); } else if (operation == "PROPPATCH") { - let headers = { "content-type": "application/xml; charset=utf8" }; + let headers = { "content-type": "application/xml; charset=utf-8" }; this._sendHTTPRequest(operation, parameters, headers); } else if (operation == "OPTIONS") { @@ -406,7 +406,7 @@ sogoWebDAV.prototype = { }, post: function(data, contentType) { if (typeof(contentType) == "undefined") { - contentType = "application/xml; charset=utf8"; + contentType = "application/xml; charset=utf-8"; } this.load("POST", {data: data, contentType: contentType}); },