Skip to content

Commit 95b9f97

Browse files
authored
Corrected check for type for IE attachEvent onsubmit event
initially it was checking for `submit` event which is the target eventType in case of addEventHandler method contrary to `onsubmit` on attachEvent method.
1 parent 6f12262 commit 95b9f97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/csrfprotector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function csrfprotector_init() {
206206
if (typeof HTMLFormElement.prototype.attachEvent !== 'undefined') {
207207
HTMLFormElement.prototype.attachEvent_ = HTMLFormElement.prototype.attachEvent;
208208
HTMLFormElement.prototype.attachEvent = function(eventType, fun) {
209-
if (eventType === 'submit') {
209+
if (eventType === 'onsubmit') {
210210
var wrapped = CSRFP._csrfpWrap(fun, this);
211211
this.attachEvent_(eventType, wrapped);
212212
} else {

0 commit comments

Comments
 (0)