Bonita Portal incompatible with Chrome 60

Description

Not possible to write information such as user details.

Other web browser (Internet Explorer, Firefox,...) are not impacted.

Patch to apply to version earlier than 7.5.4:
For Community Edition you can edit the file portal/scripts/includes/common.js that is part of bonita web app (bonita.war) and add the following code at the end of the file:

// Monkey Patch xhr
// Due to a specification change in the xhr.getAllResponseHeaders method Bonita Portal does not behave as expected
// in browsers that implement this new specification (currently only Chrome >60).
// This patch fixes xhr.getAllResponseHeaders unwanted behavior whithin Bonita Portal context
// See https://bugs.chromium.org/p/chromium/issues/detail?id=749086
// See https://github.com/whatwg/xhr/issues/146
(function (xhr) {
var caseSensitiveHeaders = ['Content-Range', 'X-Bonita-API-Token'];

var getAllResponseHeaders = xhr.getAllResponseHeaders;

xhr.getAllResponseHeaders = function () {
var headers = getAllResponseHeaders.apply(this);
for (var i = 0; i < caseSensitiveHeaders.length; i++) {
headers = headers.replace(new RegExp('^' + caseSensitiveHeaders[i].toLowerCase(), 'm'), caseSensitiveHeaders[i]);
}
return headers;
}
})(XMLHttpRequest.prototype)

Environment

None

Steps to reproduce

Try to edit a user information in administration view.

Workaround

Use another web browser.

External Link

None

Status

Assignee

Antoine Mottier

Reporter

Antoine Mottier

Reference

BS-16954

Components

Affects versions

7.4.2
7.5.1
7.5.2
7.4.3
7.4.0
7.4.1
7.5.0