Plugin Directory

Changeset 2615458


Ignore:
Timestamp:
10/17/2021 08:53:13 PM (4 years ago)
Author:
2fas
Message:

Release v3.1.0

Location:
2fas/trunk
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • 2fas/trunk/assets/js/dashboard.js

    r2551311 r2615458  
    1515        var reloadWarningModal = $( '.twofas-reload-warning-modal' ),
    1616            errorModal         = $( '.twofas-error-modal' ),
     17            successModal       = $( '.twofas-success-modal' ),
    1718            migrateModal       = $('.twofas-migrate-users-confirmation-modal');
    1819
     
    2122            myChart             = $( '#myChart' ),
    2223            errorModalMessage   = $( '#error-modal-message' ),
     24            successModalMessage = $( '#success-modal-message' ),
    2325            qrImg               = $( 'img.twofas-qr-code' ),
    2426            qrSpinner           = $( '.twofas-spinner-container.twofas-qr-refresh' ),
     
    276278                            clearInterval( migrationIntervalId );
    277279                            userBoxTitle.html( twofas.migrationCompleted );
     280                            successModalMessage.html( 'Migration completed successfully. Now please turn off and uninstall 2FAS Classic plugin.' );
     281                            successModal.trigger( 'display' );
    278282                            migrateUsersButton.hide();
    279283                            setTimeout(function() {
  • 2fas/trunk/assets/js/dashboard.min.js

    r2551311 r2615458  
    1 !function(r){try{var e=r(".js-generate-offline-codes"),s=r(".js-open-migrate-users-modal"),t=r(".js-twofas-migrate-users"),a=r(".js-reload-qr-code"),o=r(".js-reload-qr-code-and-set-modal-status"),n=r(".js-send-sms"),i=r(".js-waiting-button"),d=r(".js-waiting-link"),c=r(".js-autofocus"),l=r(".twofas-reload-warning-modal"),f=r(".twofas-error-modal"),u=r(".twofas-migrate-users-confirmation-modal"),p=r(".twofas-trusted-device"),w=r(".twofas-offline-codes-date"),m=r("#myChart"),v=r("#error-modal-message"),h=r("img.twofas-qr-code"),g=r(".twofas-spinner-container.twofas-qr-refresh"),b=r(".twofas-admin-users-wrapper h2"),j="",C=0;function y(e){var t,a=(t=e,JSON.parse(t.responseText).error);void 0===a&&(a="Server error occurred. Please try to refresh this page."),v.html(a),f.trigger("display")}function x(e){var t=e.qrCode,a=e.totpSecret;r(".twofas-qr-code").attr("src",t),r(".twofas-totp-secret").html(a),r("#totp-secret").val(a),r(".twofas-mobile-config").attr("href",e.qrCodeMessage),h.removeClass("twofas-hidden"),g.removeClass("twofas-visible")}function k(){var e=r(".twofas-reload-qr-code-form").attr("action"),t={_wpnonce:r('.twofas-buttons-bottom > input[name="_wpnonce"]').val()};h.addClass("twofas-hidden"),g.addClass("twofas-visible"),r.ajax({url:e,type:"post",data:t,success:x,error:y})}function _(e){return twofas.months[e]}function q(){var e=r("#myChart")[0].getContext("2d"),t={datasets:[{data:[r(".js-active-users-count").val(),r(".js-inactive-users-count").val()],backgroundColor:["#202225","#eb1c23"],borderWidth:0}],labels:[twofas.activeUsers,twofas.inactiveUsers]};m=new Chart(e,{type:"doughnut",data:t,options:{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},title:{display:!1},animation:{animateScale:!0,animateRotate:!0},tooltips:{enabled:!0}}}),r("#js-legend").html(m.generateLegend()),m.update()}t.length&&t.on("click",function(e){e.preventDefault(),u.trigger("close"),s.attr("disabled",!0),j=b.html();var t=r("#twofas-migration-users-form").attr("action"),a={_wpnonce:r('#twofas-migration-users-form > input[name="_wpnonce"]').val()},o=0;r.ajax({url:t,type:"post",data:a,error:function(e){y(e)}}),C=setInterval(function(){o=++o%4,b.html(twofas.migrationInProgress+Array(o+1).join("."))},500),m.data.labels[1]=twofas.migratedUsers,m.data.datasets[0].backgroundColor[1]="#10b74a",m.update(),r("#js-legend").html(m.generateLegend()),function a(){setTimeout(function(){r.ajax({url:twofas.ajaxUrl,type:"get",data:{page:twofas.submenuDashboard,"twofas-action":"migration-users-status"},success:function(e){var t=m.data;0<t.datasets.length&&(t.datasets[0].data[1]=e.migrated_users),m.update(),e.migrated_users>=e.active_users_count?(clearInterval(C),b.html(twofas.migrationCompleted),s.hide(),setTimeout(function(){q(),b.html(j)},3e3)):a()},error:function(e){y(e)}})},1e3)}()}),p.length&&(r(".twofas-trusted-device-country").each(function(e,a){r.get("https://ipapi.co/"+a.innerText+"/json/",function(e){var t=e.country;a.innerText=t||"",a.className+=" twofas-visible"})}),r(".twofas-date").each(function(e,t){var a,o=1e3*t.innerText;isNaN(o)||(t.innerText=_((a=new Date(o)).getMonth())+" "+a.getDate()+", "+a.getFullYear())}),r(".twofas-hour").each(function(e,t){var a,o,s,n,r=1e3*t.innerText;isNaN(r)||(t.innerText=(a=new Date(r),o=a.getHours(),s=a.getMinutes(),n=12<=o?"PM":"AM",12<o&&(o-=12),s<10&&(s="0"+s),o+":"+s+" "+n),t.className+=" twofas-visible")})),w.length&&function(){var e=1e3*w[0].innerText;if(!isNaN(e)){var t=new Date(e),a=_(t.getMonth()),o=t.getDate(),s=t.getFullYear();w[0].innerText=o+" "+a+" "+s}}(),m.length&&q(),c.focus(function(){this.value=this.value}),e.click(function(e){e.preventDefault();var t=r(".twofas-generate-offline-codes-form").attr("action"),a=r('.twofas-generate-offline-codes-form > input[name="_wpnonce"]').val(),n=r(this);n.addClass("twofas-wait").prop("disabled",!0);var o={_wpnonce:a};r.ajax({url:t,type:"post",data:o,success:function(e){var t=e.codes,a=encodeURIComponent(t.join("\n")),o=function(e){var t,a="<code><pre>";for(t in e)e.hasOwnProperty(t)&&(a+=e[t]+"\r\n");return a+="</pre></code>"}(t),s=function(e){var t,a="";for(t in e)e.hasOwnProperty(t)&&(a+='<input type="hidden" name="code['+t+']" value="'+e[t]+'" />');return a}(t);r(".twofas-offline-stats-generated").hide(),r(".twofas-offline-codes-data").html(o),r(".twofas-offline-codes-inputs").html(s),r(".twofas-download-codes-link").attr("href","data:text/plain;charset=utf-8,"+a),r(".twofas-offline-codes-list").show(),r(".js-backup-codes-tick").removeClass("twofas-icon-tick").addClass("twofas-icon-tick-enabled"),n.removeClass("twofas-wait").prop("disabled",!1)},error:function(e){n.removeClass("twofas-wait").prop("disabled",!1),y(e)}})}),a.submit(function(e){e.preventDefault(),k()}),r(document).on("click",".js-reload-qr-code",function(e){e.preventDefault(),k()}),o.submit(function(e){if(e.preventDefault(),r("#reload-modal-check").is(":checked")){var t=r(".js-reload-qr-code-and-set-modal-status").attr("action"),a={_wpnonce:r('.js-reload-qr-code-and-set-modal-status > input[name="_wpnonce"]').val()};r.ajax({url:t,type:"post",data:a,error:y}),r(".twofas-reload-qr-code-form").removeClass("js-open-reload-warning-modal").addClass("js-reload-qr-code")}l.trigger("close"),k()}),n.click(function(e){e.preventDefault();var t=r(this);t.addClass("twofas-wait").prop("disabled",!0);var a=r(".twofas-send-sms-form").attr("action"),o=r('.twofas-send-sms-form > input[name="_wpnonce"]').val(),s=r("#phone-number").val(),n={phone_number:s,_wpnonce:o};r.ajax({url:a,type:"post",data:n,success:function(e){r("#verified-phone-number").val(s),r("#authentication-id").val(e.authenticationId),r(".twofas-sms-sent-button-text").hide(),r(".twofas-sms-sent-message").show(),t.removeClass("twofas-wait"),r("#twofas-token").prop("disabled",!1),r(".twofas-enable-token-btn").prop("disabled",!1)},error:function(e){t.removeClass("twofas-wait").prop("disabled",!1),y(e)}})}),i.submit(function(e){e.preventDefault();var t=this;return r(this).find('*[type="submit"]').addClass("twofas-wait").prop("disabled",!0),setTimeout(function(){t.submit()},1),!0}),d.click(function(){r(this).addClass("twofas-wait").prop("disabled",!0)})}catch(e){Sentry.captureException(e),v.html("Server error occurred. Please try to refresh this page."),f.trigger("display")}}(jQuery);
     1!function(r){try{var e=r(".js-generate-offline-codes"),o=r(".js-open-migrate-users-modal"),t=r(".js-twofas-migrate-users"),a=r(".js-reload-qr-code"),s=r(".js-reload-qr-code-and-set-modal-status"),n=r(".js-send-sms"),i=r(".js-waiting-button"),d=r(".js-waiting-link"),l=r(".js-autofocus"),c=r(".twofas-reload-warning-modal"),f=r(".twofas-error-modal"),u=r(".twofas-success-modal"),p=r(".twofas-migrate-users-confirmation-modal"),m=r(".twofas-trusted-device"),w=r(".twofas-offline-codes-date"),v=r("#myChart"),g=r("#error-modal-message"),h=r("#success-modal-message"),b=r("img.twofas-qr-code"),j=r(".twofas-spinner-container.twofas-qr-refresh"),y=r(".twofas-admin-users-wrapper h2"),C="",x=0;function k(e){var t,a=(t=e,JSON.parse(t.responseText).error);void 0===a&&(a="Server error occurred. Please try to refresh this page."),g.html(a),f.trigger("display")}function _(e){var t=e.qrCode,a=e.totpSecret;r(".twofas-qr-code").attr("src",t),r(".twofas-totp-secret").html(a),r("#totp-secret").val(a),r(".twofas-mobile-config").attr("href",e.qrCodeMessage),b.removeClass("twofas-hidden"),j.removeClass("twofas-visible")}function q(){var e=r(".twofas-reload-qr-code-form").attr("action"),t={_wpnonce:r('.twofas-buttons-bottom > input[name="_wpnonce"]').val()};b.addClass("twofas-hidden"),j.addClass("twofas-visible"),r.ajax({url:e,type:"post",data:t,success:_,error:k})}function D(e){return twofas.months[e]}function T(){var e=r("#myChart")[0].getContext("2d"),t={datasets:[{data:[r(".js-active-users-count").val(),r(".js-inactive-users-count").val()],backgroundColor:["#202225","#eb1c23"],borderWidth:0}],labels:[twofas.activeUsers,twofas.inactiveUsers]};v=new Chart(e,{type:"doughnut",data:t,options:{responsive:!0,maintainAspectRatio:!1,legend:{display:!1},title:{display:!1},animation:{animateScale:!0,animateRotate:!0},tooltips:{enabled:!0}}}),r("#js-legend").html(v.generateLegend()),v.update()}t.length&&t.on("click",function(e){e.preventDefault(),p.trigger("close"),o.attr("disabled",!0),C=y.html();var t=r("#twofas-migration-users-form").attr("action"),a={_wpnonce:r('#twofas-migration-users-form > input[name="_wpnonce"]').val()},s=0;r.ajax({url:t,type:"post",data:a,error:function(e){k(e)}}),x=setInterval(function(){s=++s%4,y.html(twofas.migrationInProgress+Array(s+1).join("."))},500),v.data.labels[1]=twofas.migratedUsers,v.data.datasets[0].backgroundColor[1]="#10b74a",v.update(),r("#js-legend").html(v.generateLegend()),function a(){setTimeout(function(){r.ajax({url:twofas.ajaxUrl,type:"get",data:{page:twofas.submenuDashboard,"twofas-action":"migration-users-status"},success:function(e){var t=v.data;0<t.datasets.length&&(t.datasets[0].data[1]=e.migrated_users),v.update(),e.migrated_users>=e.active_users_count?(clearInterval(x),y.html(twofas.migrationCompleted),h.html("Migration completed successfully. Now please turn off and uninstall 2FAS Classic plugin."),u.trigger("display"),o.hide(),setTimeout(function(){T(),y.html(C)},3e3)):a()},error:function(e){k(e)}})},1e3)}()}),m.length&&(r(".twofas-trusted-device-country").each(function(e,a){r.get("https://ipapi.co/"+a.innerText+"/json/",function(e){var t=e.country;a.innerText=t||"",a.className+=" twofas-visible"})}),r(".twofas-date").each(function(e,t){var a,s=1e3*t.innerText;isNaN(s)||(t.innerText=D((a=new Date(s)).getMonth())+" "+a.getDate()+", "+a.getFullYear())}),r(".twofas-hour").each(function(e,t){var a,s,o,n,r=1e3*t.innerText;isNaN(r)||(t.innerText=(a=new Date(r),s=a.getHours(),o=a.getMinutes(),n=12<=s?"PM":"AM",12<s&&(s-=12),o<10&&(o="0"+o),s+":"+o+" "+n),t.className+=" twofas-visible")})),w.length&&function(){var e=1e3*w[0].innerText;if(!isNaN(e)){var t=new Date(e),a=D(t.getMonth()),s=t.getDate(),o=t.getFullYear();w[0].innerText=s+" "+a+" "+o}}(),v.length&&T(),l.focus(function(){this.value=this.value}),e.click(function(e){e.preventDefault();var t=r(".twofas-generate-offline-codes-form").attr("action"),a=r('.twofas-generate-offline-codes-form > input[name="_wpnonce"]').val(),n=r(this);n.addClass("twofas-wait").prop("disabled",!0);var s={_wpnonce:a};r.ajax({url:t,type:"post",data:s,success:function(e){var t=e.codes,a=encodeURIComponent(t.join("\n")),s=function(e){var t,a="<code><pre>";for(t in e)e.hasOwnProperty(t)&&(a+=e[t]+"\r\n");return a+="</pre></code>"}(t),o=function(e){var t,a="";for(t in e)e.hasOwnProperty(t)&&(a+='<input type="hidden" name="code['+t+']" value="'+e[t]+'" />');return a}(t);r(".twofas-offline-stats-generated").hide(),r(".twofas-offline-codes-data").html(s),r(".twofas-offline-codes-inputs").html(o),r(".twofas-download-codes-link").attr("href","data:text/plain;charset=utf-8,"+a),r(".twofas-offline-codes-list").show(),r(".js-backup-codes-tick").removeClass("twofas-icon-tick").addClass("twofas-icon-tick-enabled"),n.removeClass("twofas-wait").prop("disabled",!1)},error:function(e){n.removeClass("twofas-wait").prop("disabled",!1),k(e)}})}),a.submit(function(e){e.preventDefault(),q()}),r(document).on("click",".js-reload-qr-code",function(e){e.preventDefault(),q()}),s.submit(function(e){if(e.preventDefault(),r("#reload-modal-check").is(":checked")){var t=r(".js-reload-qr-code-and-set-modal-status").attr("action"),a={_wpnonce:r('.js-reload-qr-code-and-set-modal-status > input[name="_wpnonce"]').val()};r.ajax({url:t,type:"post",data:a,error:k}),r(".twofas-reload-qr-code-form").removeClass("js-open-reload-warning-modal").addClass("js-reload-qr-code")}c.trigger("close"),q()}),n.click(function(e){e.preventDefault();var t=r(this);t.addClass("twofas-wait").prop("disabled",!0);var a=r(".twofas-send-sms-form").attr("action"),s=r('.twofas-send-sms-form > input[name="_wpnonce"]').val(),o=r("#phone-number").val(),n={phone_number:o,_wpnonce:s};r.ajax({url:a,type:"post",data:n,success:function(e){r("#verified-phone-number").val(o),r("#authentication-id").val(e.authenticationId),r(".twofas-sms-sent-button-text").hide(),r(".twofas-sms-sent-message").show(),t.removeClass("twofas-wait"),r("#twofas-token").prop("disabled",!1),r(".twofas-enable-token-btn").prop("disabled",!1)},error:function(e){t.removeClass("twofas-wait").prop("disabled",!1),k(e)}})}),i.submit(function(e){e.preventDefault();var t=this;return r(this).find('*[type="submit"]').addClass("twofas-wait").prop("disabled",!0),setTimeout(function(){t.submit()},1),!0}),d.click(function(){r(this).addClass("twofas-wait").prop("disabled",!0)})}catch(e){Sentry.captureException(e),g.html("Server error occurred. Please try to refresh this page."),f.trigger("display")}}(jQuery);
  • 2fas/trunk/assets/js/modal.js

    r2551311 r2615458  
    1212            creditCardModal           = $( '.twofas-credit-card-modal' ),
    1313            errorModal                = $( '.twofas-error-modal' ),
     14            successModal              = $( '.twofas-success-modal' ),
    1415            removeConfigModal         = $( '.twofas-remove-config-modal' ),
    1516            disableTotpModal          = $( '.twofas-disable-totp-modal' ),
     
    162163        } );
    163164
     165        successModal.on( 'display', function() {
     166            openModal( successModal );
     167        } );
     168
    164169        if ( wizardModal.length ) {
    165170            openModal( wizardModal );
  • 2fas/trunk/assets/js/modal.min.js

    r2551311 r2615458  
    1 !function(e){try{var t=e(".twofas-qr-modal"),o=e(".twofas-plan-modal"),a=e(".twofas-deletion-confirmation-modal"),n=e(".twofas-delete-totp-modal"),i=e(".twofas-logout-modal"),s=e(".twofas-downgrade-modal"),l=e(".twofas-wizard-modal"),d=e(".twofas-reload-warning-modal"),c=e(".twofas-credit-card-modal"),f=e(".twofas-error-modal"),r=e(".twofas-remove-config-modal"),u=e(".twofas-disable-totp-modal"),m=e(".twofas-disable-phone-modal"),p=e(".twofas-migrate-users-confirmation-modal"),w=e(".js-close-modal"),h=e(".js-open-qr-modal"),v=e(".js-open-plan-modal"),b=e(".js-plan-redirect"),j=e(".js-confirm"),g=e(".js-close-cc-complete"),D=e(".js-open-logout-modal"),k=e(".js-open-reload-warning-modal"),y=e(".js-open-downgrade-modal"),C=e(".js-open-credit-card-modal"),q=e(".js-open-deletion-confirmation-modal"),x=e(".js-open-delete-totp-modal"),z=e(".js-open-remove-config-modal"),E=e(".js-open-disable-totp-modal"),Q=e(".js-open-disable-phone-modal"),S=e(".js-open-migrate-users-modal"),A=".twofas-modal-backdrop",B=!1,F=null;function G(t){t.css({display:"table"}).animate({opacity:1},500),B=!0}function H(t){t.animate({opacity:0},250,function(){e(this).css({display:""}),t.children().css({display:""}),B=!1})}function I(t){if(B){var o=e(".twofas-modal");if(!o.is(t.target)&&0===o.has(t.target).length)H(o.parents().find(A))}}h.click(function(){G(t)}),v.click(function(){e(".twofas-update-card-before").removeClass("twofas-hidden"),e(".twofas-update-card-after").addClass("twofas-hidden"),G(o)}),b.click(function(){e(".twofas-update-card-before").addClass("twofas-hidden"),e(".twofas-update-card-after").removeClass("twofas-hidden")}),z.click(function(t){t.preventDefault(),G(r)}),g.click(function(t){t.preventDefault(),location.reload()}),j.click(function(t){t.preventDefault(),F.trigger("submit")}),E.submit(function(t){B||(F=e(this),t.preventDefault(),G(u))}),Q.submit(function(t){B||(F=e(this),t.preventDefault(),G(m))}),q.submit(function(t){B||(F=e(this),t.preventDefault(),G(a))}),x.submit(function(t){B||(F=e(this),t.preventDefault(),G(n))}),D.submit(function(t){B||(F=e(this),t.preventDefault(),G(i))}),k.submit(function(t){t.preventDefault(),G(d)}),d.on("close",function(){H(d)}),S.click(function(t){t.preventDefault(),G(p)}),p.on("close",function(){H(p)}),f.on("display",function(){G(f)}),l.length&&G(l),y.submit(function(t){B||(F=e(this),t.preventDefault(),G(s))}),C.submit(function(t){t.preventDefault(),G(c)}),w.click(function(t){t.preventDefault(),H(e(this).parents().find(A))}),e(document).keyup(function(t){27===t.keyCode&&I(t)}),e(document).mouseup(function(t){B&&I(t)})}catch(t){Sentry.captureException(t)}}(jQuery);
     1!function(e){try{var o=e(".twofas-qr-modal"),t=e(".twofas-plan-modal"),a=e(".twofas-deletion-confirmation-modal"),n=e(".twofas-delete-totp-modal"),i=e(".twofas-logout-modal"),s=e(".twofas-downgrade-modal"),l=e(".twofas-wizard-modal"),d=e(".twofas-reload-warning-modal"),c=e(".twofas-credit-card-modal"),f=e(".twofas-error-modal"),r=e(".twofas-success-modal"),u=e(".twofas-remove-config-modal"),m=e(".twofas-disable-totp-modal"),p=e(".twofas-disable-phone-modal"),w=e(".twofas-migrate-users-confirmation-modal"),h=e(".js-close-modal"),v=e(".js-open-qr-modal"),b=e(".js-open-plan-modal"),j=e(".js-plan-redirect"),g=e(".js-confirm"),D=e(".js-close-cc-complete"),y=e(".js-open-logout-modal"),k=e(".js-open-reload-warning-modal"),C=e(".js-open-downgrade-modal"),q=e(".js-open-credit-card-modal"),x=e(".js-open-deletion-confirmation-modal"),z=e(".js-open-delete-totp-modal"),E=e(".js-open-remove-config-modal"),Q=e(".js-open-disable-totp-modal"),S=e(".js-open-disable-phone-modal"),A=e(".js-open-migrate-users-modal"),B=".twofas-modal-backdrop",F=!1,G=null;function H(o){o.css({display:"table"}).animate({opacity:1},500),F=!0}function I(o){o.animate({opacity:0},250,function(){e(this).css({display:""}),o.children().css({display:""}),F=!1})}function J(o){if(F){var t=e(".twofas-modal");if(!t.is(o.target)&&0===t.has(o.target).length)I(t.parents().find(B))}}v.click(function(){H(o)}),b.click(function(){e(".twofas-update-card-before").removeClass("twofas-hidden"),e(".twofas-update-card-after").addClass("twofas-hidden"),H(t)}),j.click(function(){e(".twofas-update-card-before").addClass("twofas-hidden"),e(".twofas-update-card-after").removeClass("twofas-hidden")}),E.click(function(o){o.preventDefault(),H(u)}),D.click(function(o){o.preventDefault(),location.reload()}),g.click(function(o){o.preventDefault(),G.trigger("submit")}),Q.submit(function(o){F||(G=e(this),o.preventDefault(),H(m))}),S.submit(function(o){F||(G=e(this),o.preventDefault(),H(p))}),x.submit(function(o){F||(G=e(this),o.preventDefault(),H(a))}),z.submit(function(o){F||(G=e(this),o.preventDefault(),H(n))}),y.submit(function(o){F||(G=e(this),o.preventDefault(),H(i))}),k.submit(function(o){o.preventDefault(),H(d)}),d.on("close",function(){I(d)}),A.click(function(o){o.preventDefault(),H(w)}),w.on("close",function(){I(w)}),f.on("display",function(){H(f)}),r.on("display",function(){H(r)}),l.length&&H(l),C.submit(function(o){F||(G=e(this),o.preventDefault(),H(s))}),q.submit(function(o){o.preventDefault(),H(c)}),h.click(function(o){o.preventDefault(),I(e(this).parents().find(B))}),e(document).keyup(function(o){27===o.keyCode&&J(o)}),e(document).mouseup(function(o){F&&J(o)})}catch(o){Sentry.captureException(o)}}(jQuery);
  • 2fas/trunk/changelog.txt

    r2594222 r2615458  
    11== Changelog ==
     2
     3= 3.1.0 (Oct. 17, 2021) =
     4* Add deprecation info
    25
    36= 3.0.6 (Sep. 6, 2021) =
  • 2fas/trunk/constants.php

    r2594222 r2615458  
    1515define( 'TWOFAS_TEMPLATES_PATH', $templates_path );
    1616define( 'TWOFAS_WP_ADMIN_PATH', $admin_url );
    17 define( 'TWOFAS_PLUGIN_VERSION', '3.0.6' );
     17define( 'TWOFAS_PLUGIN_VERSION', '3.1.0' );
    1818define( 'TWOFAS_DEPRECATE_PHP_OLDER_THAN', '5.6' );
  • 2fas/trunk/readme.txt

    r2594222 r2615458  
    132132== Changelog ==
    133133
     134= 3.1.0 (Oct. 17, 2021) =
     135* Add deprecation info
     136
    134137= 3.0.6 (Sep. 6, 2021) =
    135138* Removed old migration
  • 2fas/trunk/start.php

    r2551311 r2615458  
    4747    }
    4848
     49    if ( $is_admin ) {
     50        add_action( 'admin_notices', function () {
     51            echo '
     52            <div class="notice notice-info info twofas-info-notice">
     53                <p>
     54                    <strong>2FAS Classic plugin is obsolete!</strong><br/>
     55                    On the 1st of December 2021, we will turn off push notifications but logging with 2FA tokens will work. <br />
     56                    From this day on 2FAS Classic plugin will not be supported anymore. <br />
     57                    We recommend you to download the 2FAS Prime plugin and then migrate all your settings and tokens from 2FAS Classic to the 2FAS Prime plugin.
     58                </p>
     59            </div>';
     60        } );
     61    }
     62
    4963    /** @var Listener_Provider $listener */
    5064    $listener = $twofas_container->get( Listener_Provider::class );
  • 2fas/trunk/templates/dashboard/admin/admin.html.twig

    r2551311 r2615458  
    361361    {% include 'modals/confirmation/downgrade-modal.html.twig' %}
    362362    {% include 'modals/confirmation/migrate-users-modal.html.twig' %}
     363    {% include 'modals/success-modal.html.twig' %}
    363364    {% include 'modals/plan-modal.html.twig' %}
    364365    {% include 'modals/credit-card-modal.html.twig' %}
  • 2fas/trunk/templates/modals/confirmation/migrate-users-modal.html.twig

    r2551311 r2615458  
    66    <div class="twofas-text-content">
    77        <p>
    8             {{ esc_html__('You are going to migrate your data from 2FAS Classic to 2FAS Prime. Remember that only 2FA settings will be migrated. Trusted devices and backup codes will not be transferred. Are you sure you want to proceed?', '2fas') }}
     8            You are going to migrate your data from 2FAS Classic to 2FAS Prime.<br />
     9            Remember that only 2FAS Classic settings and tokens (secret/service keys) will be migrated. <br />
     10            <strong>Trusted devices and backup codes will not be transferred.</strong><br />
     11            Are you sure you want to proceed?
    912        </p>
    1013    </div>
  • 2fas/trunk/twofas.php

    r2594222 r2615458  
    44 * Plugin URI:  https://wordpress.org/plugins/2fas/
    55 * Description: 2FAS strengthens WordPress admin security by requiring an additional verification code on untrusted devices.
    6  * Version:     3.0.6
     6 * Version:     3.1.0
    77 * Author:      Two Factor Authentication Service Inc.
    88 * Author URI:  https://2fas.com
  • 2fas/trunk/vendor/autoload.php

    r2343404 r2615458  
    55require_once __DIR__ . '/composer/autoload_real.php';
    66
    7 return ComposerAutoloaderInit66cf7295c106ae5a08d97a7953e2c171::getLoader();
     7return ComposerAutoloaderInit30d7a7d42f7ac83137b3d236ae23e084::getLoader();
  • 2fas/trunk/vendor/composer/autoload_real.php

    r2594222 r2615458  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit66cf7295c106ae5a08d97a7953e2c171
     5class ComposerAutoloaderInit30d7a7d42f7ac83137b3d236ae23e084
    66{
    77    private static $loader;
     
    2323        }
    2424
    25         spl_autoload_register(array('ComposerAutoloaderInit66cf7295c106ae5a08d97a7953e2c171', 'loadClassLoader'), true, true);
     25        spl_autoload_register(array('ComposerAutoloaderInit30d7a7d42f7ac83137b3d236ae23e084', 'loadClassLoader'), true, true);
    2626        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
    27         spl_autoload_unregister(array('ComposerAutoloaderInit66cf7295c106ae5a08d97a7953e2c171', 'loadClassLoader'));
     27        spl_autoload_unregister(array('ComposerAutoloaderInit30d7a7d42f7ac83137b3d236ae23e084', 'loadClassLoader'));
    2828
    2929        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
     
    3131            require __DIR__ . '/autoload_static.php';
    3232
    33             call_user_func(\Composer\Autoload\ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::getInitializer($loader));
     33            call_user_func(\Composer\Autoload\ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::getInitializer($loader));
    3434        } else {
    3535            $map = require __DIR__ . '/autoload_namespaces.php';
     
    5252
    5353        if ($useStaticLoader) {
    54             $includeFiles = Composer\Autoload\ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::$files;
     54            $includeFiles = Composer\Autoload\ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::$files;
    5555        } else {
    5656            $includeFiles = require __DIR__ . '/autoload_files.php';
    5757        }
    5858        foreach ($includeFiles as $fileIdentifier => $file) {
    59             composerRequire66cf7295c106ae5a08d97a7953e2c171($fileIdentifier, $file);
     59            composerRequire30d7a7d42f7ac83137b3d236ae23e084($fileIdentifier, $file);
    6060        }
    6161
     
    6464}
    6565
    66 function composerRequire66cf7295c106ae5a08d97a7953e2c171($fileIdentifier, $file)
     66function composerRequire30d7a7d42f7ac83137b3d236ae23e084($fileIdentifier, $file)
    6767{
    6868    if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
  • 2fas/trunk/vendor/composer/autoload_static.php

    r2551311 r2615458  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171
     7class ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084
    88{
    99    public static $files = array (
     
    10071007    {
    10081008        return \Closure::bind(function () use ($loader) {
    1009             $loader->prefixLengthsPsr4 = ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::$prefixLengthsPsr4;
    1010             $loader->prefixDirsPsr4 = ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::$prefixDirsPsr4;
    1011             $loader->prefixesPsr0 = ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::$prefixesPsr0;
    1012             $loader->classMap = ComposerStaticInit66cf7295c106ae5a08d97a7953e2c171::$classMap;
     1009            $loader->prefixLengthsPsr4 = ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::$prefixLengthsPsr4;
     1010            $loader->prefixDirsPsr4 = ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::$prefixDirsPsr4;
     1011            $loader->prefixesPsr0 = ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::$prefixesPsr0;
     1012            $loader->classMap = ComposerStaticInit30d7a7d42f7ac83137b3d236ae23e084::$classMap;
    10131013
    10141014        }, null, ClassLoader::class);
  • 2fas/trunk/vendor/composer/installed.json

    r2594222 r2615458  
    3333            "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
    3434            "homepage": "https://github.com/container-interop/container-interop",
     35            "support": {
     36                "issues": "https://github.com/container-interop/container-interop/issues",
     37                "source": "https://github.com/container-interop/container-interop/tree/master"
     38            },
    3539            "abandoned": "psr/container",
    3640            "install-path": "../container-interop/container-interop"
     
    8791                "qrcode"
    8892            ],
     93            "support": {
     94                "issues": "https://github.com/endroid/qr-code/issues",
     95                "source": "https://github.com/endroid/qr-code/tree/1.6.6"
     96            },
    8997            "install-path": "../endroid/qr-code"
    9098        },
     
    133141                "invoker"
    134142            ],
     143            "support": {
     144                "issues": "https://github.com/PHP-DI/Invoker/issues",
     145                "source": "https://github.com/PHP-DI/Invoker/tree/master"
     146            },
    135147            "install-path": "../php-di/invoker"
    136148        },
     
    199211                "di"
    200212            ],
     213            "support": {
     214                "issues": "https://github.com/PHP-DI/PHP-DI/issues",
     215                "source": "https://github.com/PHP-DI/PHP-DI/tree/5.4"
     216            },
    201217            "install-path": "../php-di/php-di"
    202218        },
     
    239255                "reflection"
    240256            ],
     257            "support": {
     258                "issues": "https://github.com/PHP-DI/PhpDocReader/issues",
     259                "source": "https://github.com/PHP-DI/PhpDocReader/tree/master"
     260            },
    241261            "install-path": "../php-di/phpdoc-reader"
    242262        },
     
    288308                "psr-6"
    289309            ],
     310            "support": {
     311                "source": "https://github.com/php-fig/cache/tree/master"
     312            },
    290313            "install-path": "../psr/cache"
    291314        },
     
    340363                "psr"
    341364            ],
     365            "support": {
     366                "issues": "https://github.com/php-fig/container/issues",
     367                "source": "https://github.com/php-fig/container/tree/master"
     368            },
    342369            "install-path": "../psr/container"
    343370        },
     
    407434                "logging"
    408435            ],
     436            "support": {
     437                "issues": "https://github.com/getsentry/sentry-php/issues",
     438                "source": "https://github.com/getsentry/sentry-php/tree/1.11.0"
     439            },
    409440            "install-path": "../sentry/sentry"
    410441        },
     
    472503                "portable"
    473504            ],
     505            "support": {
     506                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0"
     507            },
    474508            "funding": [
    475509                {
     
    553587                "templating"
    554588            ],
     589            "support": {
     590                "issues": "https://github.com/twigphp/Twig/issues",
     591                "source": "https://github.com/twigphp/Twig/tree/1.x"
     592            },
    555593            "install-path": "../twig/twig"
    556594        },
     
    661699            ],
    662700            "description": "Encryption for TwoFAS data.",
     701            "support": {
     702                "issues": "https://github.com/twofas/encryption/issues",
     703                "source": "https://github.com/twofas/encryption/tree/master"
     704            },
    663705            "install-path": "../twofas/encryption"
    664706        },
     
    714756            ],
    715757            "description": "SDK for 2fas.com API",
     758            "support": {
     759                "issues": "https://github.com/twofas/sdk/issues",
     760                "source": "https://github.com/twofas/sdk/tree/v7.2.0"
     761            },
    716762            "install-path": "../twofas/sdk"
    717763        },
     
    756802            ],
    757803            "description": "Validation rules for SDK",
     804            "support": {
     805                "issues": "https://github.com/twofas/validation-rules/issues",
     806                "source": "https://github.com/twofas/validation-rules/tree/master"
     807            },
    758808            "install-path": "../twofas/validation-rules"
    759809        },
     
    861911                "useragent"
    862912            ],
     913            "support": {
     914                "issues": "https://github.com/WhichBrowser/Parser-PHP/issues",
     915                "source": "https://github.com/WhichBrowser/Parser-PHP/tree/v2.1.2"
     916            },
    863917            "install-path": "../whichbrowser/parser"
    864918        }
  • 2fas/trunk/vendor/composer/installed.php

    r2594222 r2615458  
    66        'install_path' => __DIR__ . '/../../',
    77        'aliases' => array(),
    8         'reference' => '16ab34c38e56f41eb9fa650f0b439d5a0ebdee7b',
     8        'reference' => '17280cee06f939f62f07096cacf0a8c383eaf79a',
    99        'name' => 'twofas/twofas-wp-plugin',
    1010        'dev' => false,
     
    152152            'install_path' => __DIR__ . '/../../',
    153153            'aliases' => array(),
    154             'reference' => '16ab34c38e56f41eb9fa650f0b439d5a0ebdee7b',
     154            'reference' => '17280cee06f939f62f07096cacf0a8c383eaf79a',
    155155            'dev_requirement' => false,
    156156        ),
Note: See TracChangeset for help on using the changeset viewer.