Change 'submit' to 'Submit' automatically for createIframeXsrfForm() inputs - Fix #1117

This commit is contained in:
Brendan Coles
2016-10-07 16:10:56 +00:00
parent baf45ca275
commit 69062f5761

View File

@@ -452,7 +452,13 @@ beef.dom = {
var attributes = inputs[i];
input = document.createElement('input');
for(key in attributes){
input.setAttribute(key, attributes[key]);
if (key == 'name' && attributes[key] == 'submit') {
// workaround for https://github.com/beefproject/beef/issues/1117
beef.debug("createIframeXsrfForm - warning: changed form input 'submit' to 'Submit'");
input.setAttribute('Submit', attributes[key]);
} else {
input.setAttribute(key, attributes[key]);
}
}
formXsrf.appendChild(input);
}