Wordfence Login Security - Version 1.0.9

Version Description

  • October 12, 2021 =
  • Fix: Prevented login errors with WooCommerce integration when manual username entry is enabled on the WooCommerce registration form
  • Fix: Corrected theme incompatibilities with WooCommerce integration
Download this release

Release Info

Developer wfalexk
Plugin Icon 128x128 Wordfence Login Security
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

css/{admin-global.1626705446.css → admin-global.1634043539.css} RENAMED
File without changes
css/{admin.1626705446.css → admin.1634043539.css} RENAMED
File without changes
css/{colorbox.1626705446.css → colorbox.1634043539.css} RENAMED
File without changes
css/{font-awesome.1626705446.css → font-awesome.1634043539.css} RENAMED
File without changes
css/{ionicons.1626705446.css → ionicons.1634043539.css} RENAMED
File without changes
css/{jquery-ui.min.1626705446.css → jquery-ui.min.1634043539.css} RENAMED
File without changes
css/{jquery-ui.structure.min.1626705446.css → jquery-ui.structure.min.1634043539.css} RENAMED
File without changes
css/{jquery-ui.theme.min.1626705446.css → jquery-ui.theme.min.1634043539.css} RENAMED
File without changes
css/{login.1626705446.css → login.1634043539.css} RENAMED
File without changes
css/{wfselect2.min.1626705446.css → wfselect2.min.1634043539.css} RENAMED
File without changes
js/{Chart.bundle.min.1626705446.js → Chart.bundle.min.1634043539.js} RENAMED
File without changes
js/{admin-global.1626705446.js → admin-global.1634043539.js} RENAMED
File without changes
js/{admin.1626705446.js → admin.1634043539.js} RENAMED
File without changes
js/{jquery.colorbox.1626705446.js → jquery.colorbox.1634043539.js} RENAMED
File without changes
js/{jquery.colorbox.min.1626705446.js → jquery.colorbox.min.1634043539.js} RENAMED
File without changes
js/{jquery.qrcode.min.1626705446.js → jquery.qrcode.min.1634043539.js} RENAMED
File without changes
js/{jquery.tmpl.min.1626705446.js → jquery.tmpl.min.1634043539.js} RENAMED
File without changes
js/{login.1626705446.js → login.1634043539.js} RENAMED
@@ -1,9 +1,101 @@
1
  (function($) {
2
  !function(Z){"use strict";Z.Zebra_Tooltips=function(t,l){var u,T,b,v,n={animation_speed:250,animation_offset:20,close_on_click:!0,content:!(this.version="2.1.0"),hide_delay:100,keep_visible:!0,max_width:250,opacity:".95",position:"center",prerender:!1,show_delay:100,vertical_alignment:"above",vertical_offset:0,onBeforeHide:null,onHide:null,onBeforeShow:null,onShow:null},r=this,_=function(e){var t,o,i,a,l,n,r,_,s,p,d,h,c,f,w=e.data("Zebra_Tooltip"),m=Z(window);return w.tooltip||(t=Z("<div>",{"class":"Zebra_Tooltip",css:{opacity:0,display:"block"}}),o=Z("<div>",{"class":"Zebra_Tooltip_Message",css:{maxWidth:w.max_width}}).html(w.content).appendTo(t),i=Z("<div>",{"class":"Zebra_Tooltip_Arrow"}).appendTo(t),a=Z("<div>").addClass("Zebra_Tooltip_Arrow_Border").appendTo(i),Z("<div>").appendTo(i),w.keep_visible&&(t.on("mouseleave"+(w.close_on_click?" click":""),function(){y(e)}),t.on("mouseenter",function(){g(e)})),t.appendTo("body"),w.sticky&&o.addClass("Zebra_Tooltip_Has_Close"),l=t.outerWidth(),n=t.outerHeight(),r=a.outerWidth(),_=a.outerHeight(),s=o.outerWidth(),p=o.outerHeight(),w={tooltip:t,tooltip_width:l,tooltip_height:n+_/2,message:o,arrow_container:i,arrow_width:r,arrow_height:_,arrow:a},t.css({width:w.tooltip_width,height:w.tooltip_height}),w.tooltip_width=w.tooltip_width+(o.outerWidth()-s),w.tooltip_height=w.tooltip_height+(o.outerHeight()-p),t.css({width:w.tooltip_width,height:w.tooltip_height,display:"none"}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),w.sticky&&!w.close&&(Z("<a>",{"class":"Zebra_Tooltip_Close",href:"javascript:void(0)"}).html("&times;").on("click",function(t){t.preventDefault();var o=e.data("Zebra_Tooltip");o.sticky=!1,e.data("Zebra_Tooltip",o),y(e)}).appendTo(w.message),w.close=!0,w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),u=m.width(),T=m.height(),d=e.offset(),Z.extend(w,{element_left:d.left,element_top:d.top,element_width:e.outerWidth(),element_height:e.outerHeight()}),v=m.scrollTop(),b=m.scrollLeft(),h="left"===w.position?w.element_left-w.tooltip_width+w.arrow_width:"right"===w.position?w.element_left+w.element_width-w.arrow_width:w.element_left+(w.element_width-w.tooltip_width)/2,c=w.element_top-w.tooltip_height,f="left"===w.position?w.tooltip_width-w.arrow_width-w.arrow_width/2:"right"===w.position?w.arrow_width/2:(w.tooltip_width-w.arrow_width)/2,h+w.tooltip_width>u+b&&(f-=u+b-(h+w.tooltip_width)-6,h=u+b-w.tooltip_width-6,f+w.arrow_width>w.tooltip_width-6&&(f=w.tooltip_width-6-w.arrow_width),h+f+w.arrow_width/2<w.element_left&&(f=-1e4)),h<b&&(f-=b-h,h=b+2,f<0&&(f=w.arrow_width/2),h+f+w.arrow_width/2>w.element_left+w.element_width&&(f=-1e4)),w.message.css("margin-top",""),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Top").addClass("Zebra_Tooltip_Arrow_Bottom"),c<v||"below"===w.vertical_alignment&&w.element_top+w.element_height+w.vertical_offset+w.tooltip_height+w.animation_offset<T+v?(c=w.element_top+w.element_height-w.vertical_offset,w.animation_offset=Math.abs(w.animation_offset),w.message.css("margin-top",w.arrow_height/2),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Bottom").addClass("Zebra_Tooltip_Arrow_Top")):(w.animation_offset=-Math.abs(w.animation_offset),c+=w.vertical_offset),w.arrow_container.css("left",f),w.tooltip.css({left:h,top:c}),Z.extend(w,{tooltip_left:h,tooltip_top:c,arrow_left:f}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w),w},g=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.show_timeout),o.muted||(clearTimeout(o.hide_timeout),o.show_timeout=setTimeout(function(){(o=_(t)).onBeforeShow&&"function"==typeof o.onBeforeShow&&!1===o.onBeforeShow(t,o.tooltip)||("block"!==o.tooltip.css("display")&&o.tooltip.css({top:o.tooltip_top+o.animation_offset}),o.tooltip.css("display","block"),o.tooltip.stop(),o.tooltip.animate({top:o.tooltip_top,opacity:o.opacity},o.animation_speed,function(){o.onShow&&"function"==typeof o.onShow&&o.onShow(t,o.tooltip)}))},o.show_delay))},y=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.hide_timeout),o.sticky||(clearTimeout(o.show_timeout),o.hide_timeout=setTimeout(function(){if(o.tooltip){if(o.onBeforeHide&&"function"==typeof o.onBeforeHide&&!1===o.onBeforeHide(t,o.tooltip))return;o.close=!1,o.destroy&&(o.muted=!0),t.data("Zebra_Tooltip",o),Z("a.Zebra_Tooltip_Close",o.tooltip).remove(),o.tooltip.stop(),o.tooltip.animate({opacity:0,top:o.tooltip_top+o.animation_offset},o.animation_speed,function(){Z(this).css("display","none"),o.onHide&&"function"==typeof o.onHide&&o.onHide(t,o.tooltip)})}},o.hide_delay))};r.hide=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),y(t))})},r.show=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!0,o.muted=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),g(t))})},t.each(function(){var t,o=Z(this),e=o.attr("title"),i=o.data(),a={};for(t in i)0===t.indexOf("ztt_")&&(t=t.replace(/^ztt\_/,""),void 0!==n[t]&&(a[t]=i["ztt_"+t]));a=Z.extend(n,r.settings,l,a),e&&(a.content=o.attr("title")),void 0!==a.content&&""!==a.content.trim()&&(o.on({mouseenter:function(){e&&Z(this).attr("title",""),g(o)},mouseleave:function(){y(o),e&&Z(this).attr("title",e)}}),o.data("Zebra_Tooltip",Z.extend({tooltip:null,show_timeout:null,hide_timeout:null,sticky:!1,destroy:!1,muted:!1},a)),a.prerender&&_(o))})}}($);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  var wfls_init_captcha = function(actionCallback, log) {
5
  if (typeof log === 'undefined')
6
- log = $('input[name="log"], input[name="user_login"], input[name=username]');
7
  if (typeof grecaptcha === 'object') {
8
  grecaptcha.ready(function() {
9
  grecaptcha.execute(WFLSVars.recaptchasitekey, {action: 'login'}).then(function(token) {
@@ -48,6 +140,7 @@
48
  dom.html(messageHtml);
49
  heading.after(dom);
50
  dom.get(0).scrollIntoView();
 
51
  }
52
  else if ($('.woocommerce').length > 0){
53
  var content = $('<div class="woocommerce wfls-login-message">');
@@ -55,12 +148,57 @@
55
  .addClass(type === 'error' ? 'woocommerce-error' : 'woocommerce-info');
56
  content.append(errorList);
57
  errorList.append($('<li>').html(messageHtml));
58
- $('#primary').before(content);
59
- content.get(0).scrollIntoView();
60
- }
61
- else {
62
- alert(message);
 
 
 
 
 
 
 
 
 
 
 
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
 
@@ -69,8 +207,7 @@
69
  e.preventDefault();
70
  e.stopPropagation();
71
 
72
- var log = $('input[name="user_login"], #reg_email');
73
- if (log.length) {
74
  $('#wfls-prompt-overlay').remove();
75
  var overlay = $('<div id="wfls-prompt-overlay"></div>');
76
  var wrapper = $('<div id="wfls-prompt-wrapper"></div>');
@@ -79,7 +216,7 @@
79
  var button = $('<p class="submit"><input type="submit" name="wfls-support-submit" id="wfls-support-submit" class="button button-primary button-large" value="Send"/></p>');
80
  wrapper.append(field).append(nonce).append(button);
81
  overlay.append(wrapper);
82
- log.closest('form').css('position', 'relative').append(overlay);
83
 
84
  $('#wfls-message-nonce').val($(this).data('token'));
85
 
@@ -89,7 +226,7 @@
89
 
90
  $('#login_error, p.message').remove();
91
 
92
- var data = log.closest('form').serialize();
93
  data += '&action=wordfence_ls_register_support';
94
 
95
  $.ajax({
@@ -125,18 +262,14 @@
125
 
126
  var wfls_query_ajax = function() {
127
  $('.wfls-login-message').remove();
128
-
129
- var log = $('input[name="log"],input[name=username]');
130
- var pwd = $('input[name="pwd"],input[name=password]');
131
- var form = null;
132
- if (log.length && pwd.length) {
133
- form = log.closest('form');
134
- }
135
-
136
- if (form === null) {
137
- console.log('Expected fields not found, try reloading page.');
138
  return;
139
  }
 
 
 
140
 
141
  var data = $(form).serialize();
142
  data += '&action=wordfence_ls_authenticate';
@@ -249,10 +382,8 @@
249
 
250
  $(function() {
251
  //Login
252
- var log = $('input[name="log"],input[name=username]');
253
- var pwd = $('input[name="pwd"],input[name=password]');
254
- if (log.length && pwd.length) {
255
- log.closest('form').on('submit', function(e) {
256
  var loggingIn = !!parseInt($(this).data('wflsLoggingIn'));
257
  $(this).data('wflsLoggingIn', 0);
258
  if (loggingIn) { return; }
@@ -270,9 +401,8 @@
270
  }
271
 
272
  //Registration
273
- log = $('input[name="user_login"], #reg_email');
274
- if (log.length) {
275
- log.closest('form').on('submit', function(e) {
276
  var form = $(this);
277
  var registering = !!parseInt(form.data('wflsRegistering'));
278
  form.data('wflsRegistering', 0);
@@ -281,7 +411,7 @@
281
  e.stopPropagation();
282
 
283
  form.data('wflsRegistering', 1);
284
- wfls_init_captcha(function() { form.find('[type=submit]').first().trigger('click'); }, log);
285
  }
286
  });
287
  }
@@ -291,7 +421,7 @@
291
  verificationField.val(WFLSVars.verification);
292
  }
293
  else {
294
- var log = $('input[name="log"], input[name="user_login"], input[name=username], #reg_email');
295
  if (log.length) {
296
  verificationField = $('<input type="hidden" name="wfls-email-verification" id="wfls-email-verification" />');
297
  verificationField.val(WFLSVars.verification);
1
  (function($) {
2
  !function(Z){"use strict";Z.Zebra_Tooltips=function(t,l){var u,T,b,v,n={animation_speed:250,animation_offset:20,close_on_click:!0,content:!(this.version="2.1.0"),hide_delay:100,keep_visible:!0,max_width:250,opacity:".95",position:"center",prerender:!1,show_delay:100,vertical_alignment:"above",vertical_offset:0,onBeforeHide:null,onHide:null,onBeforeShow:null,onShow:null},r=this,_=function(e){var t,o,i,a,l,n,r,_,s,p,d,h,c,f,w=e.data("Zebra_Tooltip"),m=Z(window);return w.tooltip||(t=Z("<div>",{"class":"Zebra_Tooltip",css:{opacity:0,display:"block"}}),o=Z("<div>",{"class":"Zebra_Tooltip_Message",css:{maxWidth:w.max_width}}).html(w.content).appendTo(t),i=Z("<div>",{"class":"Zebra_Tooltip_Arrow"}).appendTo(t),a=Z("<div>").addClass("Zebra_Tooltip_Arrow_Border").appendTo(i),Z("<div>").appendTo(i),w.keep_visible&&(t.on("mouseleave"+(w.close_on_click?" click":""),function(){y(e)}),t.on("mouseenter",function(){g(e)})),t.appendTo("body"),w.sticky&&o.addClass("Zebra_Tooltip_Has_Close"),l=t.outerWidth(),n=t.outerHeight(),r=a.outerWidth(),_=a.outerHeight(),s=o.outerWidth(),p=o.outerHeight(),w={tooltip:t,tooltip_width:l,tooltip_height:n+_/2,message:o,arrow_container:i,arrow_width:r,arrow_height:_,arrow:a},t.css({width:w.tooltip_width,height:w.tooltip_height}),w.tooltip_width=w.tooltip_width+(o.outerWidth()-s),w.tooltip_height=w.tooltip_height+(o.outerHeight()-p),t.css({width:w.tooltip_width,height:w.tooltip_height,display:"none"}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),w.sticky&&!w.close&&(Z("<a>",{"class":"Zebra_Tooltip_Close",href:"javascript:void(0)"}).html("&times;").on("click",function(t){t.preventDefault();var o=e.data("Zebra_Tooltip");o.sticky=!1,e.data("Zebra_Tooltip",o),y(e)}).appendTo(w.message),w.close=!0,w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w)),u=m.width(),T=m.height(),d=e.offset(),Z.extend(w,{element_left:d.left,element_top:d.top,element_width:e.outerWidth(),element_height:e.outerHeight()}),v=m.scrollTop(),b=m.scrollLeft(),h="left"===w.position?w.element_left-w.tooltip_width+w.arrow_width:"right"===w.position?w.element_left+w.element_width-w.arrow_width:w.element_left+(w.element_width-w.tooltip_width)/2,c=w.element_top-w.tooltip_height,f="left"===w.position?w.tooltip_width-w.arrow_width-w.arrow_width/2:"right"===w.position?w.arrow_width/2:(w.tooltip_width-w.arrow_width)/2,h+w.tooltip_width>u+b&&(f-=u+b-(h+w.tooltip_width)-6,h=u+b-w.tooltip_width-6,f+w.arrow_width>w.tooltip_width-6&&(f=w.tooltip_width-6-w.arrow_width),h+f+w.arrow_width/2<w.element_left&&(f=-1e4)),h<b&&(f-=b-h,h=b+2,f<0&&(f=w.arrow_width/2),h+f+w.arrow_width/2>w.element_left+w.element_width&&(f=-1e4)),w.message.css("margin-top",""),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Top").addClass("Zebra_Tooltip_Arrow_Bottom"),c<v||"below"===w.vertical_alignment&&w.element_top+w.element_height+w.vertical_offset+w.tooltip_height+w.animation_offset<T+v?(c=w.element_top+w.element_height-w.vertical_offset,w.animation_offset=Math.abs(w.animation_offset),w.message.css("margin-top",w.arrow_height/2),w.arrow_container.removeClass("Zebra_Tooltip_Arrow_Bottom").addClass("Zebra_Tooltip_Arrow_Top")):(w.animation_offset=-Math.abs(w.animation_offset),c+=w.vertical_offset),w.arrow_container.css("left",f),w.tooltip.css({left:h,top:c}),Z.extend(w,{tooltip_left:h,tooltip_top:c,arrow_left:f}),w=Z.extend(e.data("Zebra_Tooltip"),w),e.data("Zebra_Tooltip",w),w},g=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.show_timeout),o.muted||(clearTimeout(o.hide_timeout),o.show_timeout=setTimeout(function(){(o=_(t)).onBeforeShow&&"function"==typeof o.onBeforeShow&&!1===o.onBeforeShow(t,o.tooltip)||("block"!==o.tooltip.css("display")&&o.tooltip.css({top:o.tooltip_top+o.animation_offset}),o.tooltip.css("display","block"),o.tooltip.stop(),o.tooltip.animate({top:o.tooltip_top,opacity:o.opacity},o.animation_speed,function(){o.onShow&&"function"==typeof o.onShow&&o.onShow(t,o.tooltip)}))},o.show_delay))},y=function(t){var o=t.data("Zebra_Tooltip");clearTimeout(o.hide_timeout),o.sticky||(clearTimeout(o.show_timeout),o.hide_timeout=setTimeout(function(){if(o.tooltip){if(o.onBeforeHide&&"function"==typeof o.onBeforeHide&&!1===o.onBeforeHide(t,o.tooltip))return;o.close=!1,o.destroy&&(o.muted=!0),t.data("Zebra_Tooltip",o),Z("a.Zebra_Tooltip_Close",o.tooltip).remove(),o.tooltip.stop(),o.tooltip.animate({opacity:0,top:o.tooltip_top+o.animation_offset},o.animation_speed,function(){Z(this).css("display","none"),o.onHide&&"function"==typeof o.onHide&&o.onHide(t,o.tooltip)})}},o.hide_delay))};r.hide=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),y(t))})},r.show=function(t,e){t.each(function(){var t=Z(this),o=t.data("Zebra_Tooltip");o&&(o.sticky=!0,o.muted=!1,e&&(o.destroy=!0),t.data("Zebra_Tooltip",o),g(t))})},t.each(function(){var t,o=Z(this),e=o.attr("title"),i=o.data(),a={};for(t in i)0===t.indexOf("ztt_")&&(t=t.replace(/^ztt\_/,""),void 0!==n[t]&&(a[t]=i["ztt_"+t]));a=Z.extend(n,r.settings,l,a),e&&(a.content=o.attr("title")),void 0!==a.content&&""!==a.content.trim()&&(o.on({mouseenter:function(){e&&Z(this).attr("title",""),g(o)},mouseleave:function(){y(o),e&&Z(this).attr("title",e)}}),o.data("Zebra_Tooltip",Z.extend({tooltip:null,show_timeout:null,hide_timeout:null,sticky:!1,destroy:!1,muted:!1},a)),a.prerender&&_(o))})}}($);
3
+
4
+ function selectorSearch(selectors) {
5
+ var input = null;
6
+ return function() {
7
+ if (input !== null)
8
+ return input;
9
+ for (var i = 0; i < selectors.length; i++) {
10
+ input = $(selectors[i]);
11
+ if (input.length === 1)
12
+ return input;
13
+ }
14
+ input = null;
15
+ return input;
16
+ }
17
+ };
18
+ function FormElementLocator(inputSelectors, extraSelectors) {
19
+ var self = this;
20
+
21
+ if (typeof extraSelectors == 'undefined')
22
+ extraSelectors = {};
23
+
24
+ var found = false;
25
+ var input = null, form = null, extra = {};
26
+
27
+ var findInput = selectorSearch(inputSelectors);
28
+ var search = function() {
29
+ input = findInput();
30
+ if (input === null)
31
+ return false;
32
+ form = input.closest('form');
33
+ if (form.length !== 1) {
34
+ form = null;
35
+ return false;
36
+ }
37
+ for (var key in extraSelectors) {
38
+ var match = form.find(extraSelectors[key]);
39
+ if (match.length === 1) {
40
+ extra[key] = match;
41
+ }
42
+ else {
43
+ return false;
44
+ }
45
+ }
46
+ return true;
47
+ };
48
+ this.locate = function() {
49
+ if (!found)
50
+ found = search();
51
+ return found;
52
+ };
53
+ this.getInput = function() {
54
+ return found ? input : null;
55
+ };
56
+ this.getForm = function() {
57
+ return found ? form : null;
58
+ };
59
+ this.getExtra = function(key) {
60
+ if (key in extra)
61
+ return extra[key];
62
+ return null;
63
+ }
64
+ }
65
+ var loginLocator = new FormElementLocator(
66
+ [
67
+ 'input[name=log]',
68
+ 'input[name=username]',
69
+ 'input#username[name=username]',
70
+ '.woocommerce-form-login input[name=username]',
71
+ '.login input[name=username]'
72
+ ],
73
+ {
74
+ password: 'input[name="pwd"],input[name=password]'
75
+ }
76
+ );
77
+ var registrationLocator = new FormElementLocator([
78
+ 'input[name=user_login]',
79
+ '#reg_email',
80
+ '.woocommerce-form-register input[name=email]',
81
+ '.register input[name=email]'
82
+ ]);
83
+ var locators = [
84
+ loginLocator,
85
+ registrationLocator
86
+ ];
87
+ function getRelevantInputs() {
88
+ var inputs = $();
89
+ for (var i = 0; i < locators.length; i++) {
90
+ if (locators[i].locate())
91
+ inputs = inputs.add(locators[i].getInput());
92
+ }
93
+ return inputs;
94
+ }
95
 
96
  var wfls_init_captcha = function(actionCallback, log) {
97
  if (typeof log === 'undefined')
98
+ log = getRelevantInputs();
99
  if (typeof grecaptcha === 'object') {
100
  grecaptcha.ready(function() {
101
  grecaptcha.execute(WFLSVars.recaptchasitekey, {action: 'login'}).then(function(token) {
140
  dom.html(messageHtml);
141
  heading.after(dom);
142
  dom.get(0).scrollIntoView();
143
+ return;
144
  }
145
  else if ($('.woocommerce').length > 0){
146
  var content = $('<div class="woocommerce wfls-login-message">');
148
  .addClass(type === 'error' ? 'woocommerce-error' : 'woocommerce-info');
149
  content.append(errorList);
150
  errorList.append($('<li>').html(messageHtml));
151
+ var containerSearch = selectorSearch([
152
+ '#primary',
153
+ '.content-area',
154
+ '#main',
155
+ '.site-main',
156
+ 'main'
157
+ ]);
158
+ var container = containerSearch();
159
+ if (container === null) {
160
+ container = loginLocator.getForm();
161
+ }
162
+ if (container !== null) {
163
+ container.before(content);
164
+ content.get(0).scrollIntoView();
165
+ return;
166
+ }
167
  }
168
+ var messageModal = $('<div>')
169
+ .attr('id', 'wfls-login-modal')
170
+ .css({
171
+ position: 'fixed',
172
+ top: 0,
173
+ right: 0,
174
+ bottom: 0,
175
+ left: 0,
176
+ 'background-color': 'rgba(0,0,0,0.5)',
177
+ 'z-index': 9999,
178
+ display: 'flex',
179
+ 'align-items': 'center',
180
+ 'justify-content': 'center',
181
+ padding: '16px'
182
+ })
183
+ .appendTo($('body'));
184
+ messageModal.append(
185
+ $('<div>')
186
+ .css({
187
+ 'background-color': '#FFF',
188
+ 'border-radius': '4px',
189
+ padding: '16px',
190
+ 'text-align': 'center'
191
+ })
192
+ .append(
193
+ $('<p>').html(messageHtml)
194
+ )
195
+ .append(
196
+ $('<button>').text('Dismiss')
197
+ .on('click', function() {
198
+ messageModal.remove();
199
+ })
200
+ )
201
+ );
202
  }
203
 
204
 
207
  e.preventDefault();
208
  e.stopPropagation();
209
 
210
+ if (registrationLocator.locate()) {
 
211
  $('#wfls-prompt-overlay').remove();
212
  var overlay = $('<div id="wfls-prompt-overlay"></div>');
213
  var wrapper = $('<div id="wfls-prompt-wrapper"></div>');
216
  var button = $('<p class="submit"><input type="submit" name="wfls-support-submit" id="wfls-support-submit" class="button button-primary button-large" value="Send"/></p>');
217
  wrapper.append(field).append(nonce).append(button);
218
  overlay.append(wrapper);
219
+ registrationLocator.getForm().css('position', 'relative').append(overlay);
220
 
221
  $('#wfls-message-nonce').val($(this).data('token'));
222
 
226
 
227
  $('#login_error, p.message').remove();
228
 
229
+ var data = registrationLocator.getForm().serialize();
230
  data += '&action=wordfence_ls_register_support';
231
 
232
  $.ajax({
262
 
263
  var wfls_query_ajax = function() {
264
  $('.wfls-login-message').remove();
265
+
266
+ if (!loginLocator.locate()) {
267
+ console.error('Required login elements not found');
 
 
 
 
 
 
 
268
  return;
269
  }
270
+ var form = loginLocator.getForm();
271
+ var log = loginLocator.getInput();
272
+ var pwd = loginLocator.getExtra('password');
273
 
274
  var data = $(form).serialize();
275
  data += '&action=wordfence_ls_authenticate';
382
 
383
  $(function() {
384
  //Login
385
+ if (loginLocator.locate()) {
386
+ loginLocator.getForm().on('submit', function(e) {
 
 
387
  var loggingIn = !!parseInt($(this).data('wflsLoggingIn'));
388
  $(this).data('wflsLoggingIn', 0);
389
  if (loggingIn) { return; }
401
  }
402
 
403
  //Registration
404
+ if (registrationLocator.locate()) {
405
+ registrationLocator.getForm().on('submit', function(e) {
 
406
  var form = $(this);
407
  var registering = !!parseInt(form.data('wflsRegistering'));
408
  form.data('wflsRegistering', 0);
411
  e.stopPropagation();
412
 
413
  form.data('wflsRegistering', 1);
414
+ wfls_init_captcha(function() { form.find('[type=submit]').first().trigger('click'); }, registrationLocator.getInput());
415
  }
416
  });
417
  }
421
  verificationField.val(WFLSVars.verification);
422
  }
423
  else {
424
+ var log = getRelevantInputs();
425
  if (log.length) {
426
  verificationField = $('<input type="hidden" name="wfls-email-verification" id="wfls-email-verification" />');
427
  verificationField.val(WFLSVars.verification);
js/{wfselect2.min.1626705446.js → wfselect2.min.1634043539.js} RENAMED
File without changes
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wfryan, wfmattr, mmaunder, wfmatt
3
  Tags: security, login security, 2fa, two factor authentication, captcha, xml-rpc, mfa, 2 factor
4
  Requires at least: 4.5
5
  Requires PHP: 5.3
6
- Tested up to: 5.8
7
- Stable tag: 1.0.8
8
 
9
  Secure your website with Wordfence Login Security, providing two-factor authentication, login and registration CAPTCHA, and XML-RPC protection.
10
 
@@ -58,6 +58,10 @@ Secure your website with Wordfence Login Security.
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 1.0.8 - July 19, 2021 =
62
  * Fix: WooCommerce integration notice can now be dismissed on any admin page
63
  * Change: Updated messaging around 2FA for WooCommerce roles
3
  Tags: security, login security, 2fa, two factor authentication, captcha, xml-rpc, mfa, 2 factor
4
  Requires at least: 4.5
5
  Requires PHP: 5.3
6
+ Tested up to: 6.0
7
+ Stable tag: 1.0.9
8
 
9
  Secure your website with Wordfence Login Security, providing two-factor authentication, login and registration CAPTCHA, and XML-RPC protection.
10
 
58
 
59
  == Changelog ==
60
 
61
+ = 1.0.9 - October 12, 2021 =
62
+ * Fix: Prevented login errors with WooCommerce integration when manual username entry is enabled on the WooCommerce registration form
63
+ * Fix: Corrected theme incompatibilities with WooCommerce integration
64
+
65
  = 1.0.8 - July 19, 2021 =
66
  * Fix: WooCommerce integration notice can now be dismissed on any admin page
67
  * Change: Updated messaging around 2FA for WooCommerce roles
wordfence-login-security.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Wordfence Login Security
4
  Description: Wordfence Login Security
5
  Author: Wordfence
6
  Author URI: http://www.wordfence.com/
7
- Version: 1.0.8
8
  Network: true
9
  Requires at least: 4.5
10
  Requires PHP: 5.3
@@ -35,8 +35,8 @@ if ($wfCoreActive && !(isset($wfCoreLoading) && $wfCoreLoading)) {
35
  else {
36
  define('WORDFENCE_LS_FROM_CORE', ($wfCoreActive && isset($wfCoreLoading) && $wfCoreLoading));
37
 
38
- define('WORDFENCE_LS_VERSION', '1.0.8');
39
- define('WORDFENCE_LS_BUILD_NUMBER', '1626705446');
40
 
41
  define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
42
 
4
  Description: Wordfence Login Security
5
  Author: Wordfence
6
  Author URI: http://www.wordfence.com/
7
+ Version: 1.0.9
8
  Network: true
9
  Requires at least: 4.5
10
  Requires PHP: 5.3
35
  else {
36
  define('WORDFENCE_LS_FROM_CORE', ($wfCoreActive && isset($wfCoreLoading) && $wfCoreLoading));
37
 
38
+ define('WORDFENCE_LS_VERSION', '1.0.9');
39
+ define('WORDFENCE_LS_BUILD_NUMBER', '1634043539');
40
 
41
  define('WORDFENCE_LS_PLUGIN_BASENAME', plugin_basename(__FILE__));
42