PluginProbe
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… / 3.0.0
Vigilant – 100% Free Security Suite: Firewall, 2FA, Login, Headers, Scanner… v3.0.0
3.0.0 2.11.12 2.11.11 2.11.10 2.11.9 2.11.7 2.11.8 2.11.6 2.11.5 2.11.4 2.11.3 2.11.1 2.11.2 2.11.0 2.10.5 2.10.4 2.10.3 2.10.2 2.10.1 2.10.0 2.9.9 2.9.8 2.9.6 2.9.7 2.9.5 All 88 releases
← All changes | assets/js/two-factor-admin.js +7 -2 2.11.73.0.0 View file →
@@ -357,9 +357,13 @@
357 357
358 358 confirmSetup: function() {
359 359 var self = this;
360 360 var c = this.cfg();
361 - var code = $('#vigilante_totp_verify_code').val().trim();
361 + // Separators are presentation: a password manager shows the code
362 + // as "123 456" and pastes it that way. The server drops everything
363 + // that is not a digit too; this is only so the length check below
364 + // measures the code and not the spaces.
365 + var code = $('#vigilante_totp_verify_code').val().replace(/\D/g, '');
362 366 var secret = $('.vigilante-totp-setup-qr').data('secret');
363 367 var $status = $('.vigilante-totp-setup-status');
364 368 var $btn = $('.vigilante-totp-confirm-setup');
365 369
@@ -414,9 +418,10 @@
414 418
415 419 reconfigure: function($btn) {
416 420 var c = this.cfg();
417 421
418 - if (!confirm(c.strings.confirmReconfig || 'This will reset your current TOTP setup. Continue?')) return;
422 + // The button carries its own question when it removes a setup nothing asks for (2.11.11).
423 + if (!confirm($btn.data('confirm') || c.strings.confirmReconfig || 'This will reset your current TOTP setup. Continue?')) return;
419 424
420 425 $btn.prop('disabled', true).text('Resetting...');
421 426
422 427 $.post(c.ajaxUrl, {