Change 'submit' to 'Submit' automatically for createIframeXsrfForm() inputs - Fix #1117
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user