Plugin Directory

Changeset 1476891


Ignore:
Timestamp:
08/17/2016 01:16:07 PM (9 years ago)
Author:
duosecurity
Message:

Release 2.5.3

Location:
duo-wordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • duo-wordpress/trunk/duo_web/Duo-Web-v2.js

    r1212814 r1476891  
    1414        duoSig,
    1515        appSig,
    16         iframe;
     16        iframe,
     17        submitCallback;
    1718
    1819    function throwError(message, url) {
     
    191192     * @param {String} [options.post_action='']               URL to POST back to after successful auth
    192193     * @param {String} [options.post_argument='sig_response'] Parameter name to use for response token
     194     * @param {Function} [options.submit_callback]            If provided, duo will not submit the form instead execute
     195     *                                                        the callback function with reference to the "duo_form" form object
     196     *                                                        submit_callback can be used to prevent the webpage from reloading.
    193197     */
    194198    function init(options) {
     
    216220                    iframeId = options.iframe;
    217221                }
     222            }
     223
     224            if (typeof options.submit_callback === 'function') {
     225                submitCallback = options.submit_callback;
    218226            }
    219227        }
     
    300308        iframe.src = [
    301309            'https://', host, '/frame/web/v1/auth?tx=', duoSig,
    302             '&parent=', document.location.href
     310            '&parent=', encodeURIComponent(document.location.href),
     311            '&v=2.3'
    303312        ].join('');
    304313
     
    338347
    339348        // away we go!
    340         form.submit();
     349        if (typeof submitCallback === "function") {
     350            submitCallback.call(null, form);
     351        } else {
     352            form.submit();
     353        }
    341354    }
    342355
     
    348361        init: init,
    349362        _parseSigRequest: parseSigRequest,
    350         _isDuoMessage: isDuoMessage
     363        _isDuoMessage: isDuoMessage,
     364        _doPostBack: doPostBack
    351365    };
    352366}(document, window));
  • duo-wordpress/trunk/duo_web/Duo-Web-v2.min.js

    r1212814 r1476891  
    1 window.Duo=function(e,t){var i=/^(?:AUTH|ENROLL)+\|[A-Za-z0-9\+\/=]+\|[A-Za-z0-9\+\/=]+$/;var n=/^ERR\|[\w\s\.\(\)]+$/;var o="duo_iframe",a="",r="sig_response",s,f,u,d,m;function c(e,t){throw new Error("Duo Web SDK error: "+e+(t?"\n"+"See "+t+" for more information":""))}function h(e){return e.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function g(e,t){if("dataset"in e){return e.dataset[t]}else{return e.getAttribute("data-"+h(t))}}function p(e,i,n,o){if("addEventListener"in t){e.addEventListener(i,o,false)}else{e.attachEvent(n,o)}}function l(e,i,n,o){if("removeEventListener"in t){e.removeEventListener(i,o,false)}else{e.detachEvent(n,o)}}function w(t){p(e,"DOMContentLoaded","onreadystatechange",t)}function v(t){l(e,"DOMContentLoaded","onreadystatechange",t)}function E(e){p(t,"message","onmessage",e)}function b(e){l(t,"message","onmessage",e)}function _(e){if(!e){return}if(e.indexOf("ERR|")===0){c(e.split("|")[1])}if(e.indexOf(":")===-1||e.split(":").length!==2){c("Duo was given a bad token.  This might indicate a configuration "+"problem with one of Duo's client libraries.","https://www.duosecurity.com/docs/duoweb#first-steps")}var t=e.split(":");f=e;u=t[0];d=t[1];return{sigRequest:e,duoSig:t[0],appSig:t[1]}}function y(){m=e.getElementById(o);if(!m){throw new Error("This page does not contain an iframe for Duo to use."+'Add an element like <iframe id="duo_iframe"></iframe> '+"to this page.  "+"See https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe "+"for more information.")}q();v(y)}function D(e){return Boolean(e.origin==="https://"+s&&typeof e.data==="string"&&(e.data.match(i)||e.data.match(n)))}function A(t){if(t){if(t.host){s=t.host}if(t.sig_request){_(t.sig_request)}if(t.post_action){a=t.post_action}if(t.post_argument){r=t.post_argument}if(t.iframe){if("tagName"in t.iframe){m=t.iframe}else if(typeof t.iframe==="string"){o=t.iframe}}}if(m){q()}else{m=e.getElementById(o);if(m){q()}else{w(y)}}v(A)}function L(e){if(D(e)){R(e.data);b(L)}}function q(){if(!s){s=g(m,"host");if(!s){c("No API hostname is given for Duo to use.  Be sure to pass "+"a `host` parameter to Duo.init, or through the `data-host` "+"attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe")}}if(!u||!d){_(g(m,"sigRequest"));if(!u||!d){c("No valid signed request is given.  Be sure to give the "+"`sig_request` parameter to Duo.init, or use the "+"`data-sig-request` attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe")}}if(a===""){a=g(m,"postAction")||a}if(r==="sig_response"){r=g(m,"postArgument")||r}m.src=["https://",s,"/frame/web/v1/auth?tx=",u,"&parent=",e.location.href].join("");E(L)}function R(t){var i=e.createElement("input");i.type="hidden";i.name=r;i.value=t+":"+d;var n=e.getElementById("duo_form");if(!n){n=e.createElement("form");m.parentElement.insertBefore(n,m.nextSibling)}n.method="POST";n.action=a;n.appendChild(i);n.submit()}w(A);return{init:A,_parseSigRequest:_,_isDuoMessage:D}}(document,window);
     1window.Duo=function(e,t){var i=/^(?:AUTH|ENROLL)+\|[A-Za-z0-9\+\/=]+\|[A-Za-z0-9\+\/=]+$/;var o=/^ERR\|[\w\s\.\(\)]+$/;var n="duo_iframe",a="",s="sig_response",r,f,u,d,m,c;function h(e,t){throw new Error("Duo Web SDK error: "+e+(t?"\n"+"See "+t+" for more information":""))}function g(e){return e.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function l(e,t){if("dataset"in e){return e.dataset[t]}else{return e.getAttribute("data-"+g(t))}}function p(e,i,o,n){if("addEventListener"in t){e.addEventListener(i,n,false)}else{e.attachEvent(o,n)}}function w(e,i,o,n){if("removeEventListener"in t){e.removeEventListener(i,n,false)}else{e.detachEvent(o,n)}}function v(t){p(e,"DOMContentLoaded","onreadystatechange",t)}function b(t){w(e,"DOMContentLoaded","onreadystatechange",t)}function E(e){p(t,"message","onmessage",e)}function _(e){w(t,"message","onmessage",e)}function y(e){if(!e){return}if(e.indexOf("ERR|")===0){h(e.split("|")[1])}if(e.indexOf(":")===-1||e.split(":").length!==2){h("Duo was given a bad token.  This might indicate a configuration "+"problem with one of Duo's client libraries.","https://www.duosecurity.com/docs/duoweb#first-steps")}var t=e.split(":");f=e;u=t[0];d=t[1];return{sigRequest:e,duoSig:t[0],appSig:t[1]}}function D(){m=e.getElementById(n);if(!m){throw new Error("This page does not contain an iframe for Duo to use."+'Add an element like <iframe id="duo_iframe"></iframe> '+"to this page.  "+"See https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe "+"for more information.")}q();b(D)}function A(e){return Boolean(e.origin==="https://"+r&&typeof e.data==="string"&&(e.data.match(i)||e.data.match(o)))}function L(t){if(t){if(t.host){r=t.host}if(t.sig_request){y(t.sig_request)}if(t.post_action){a=t.post_action}if(t.post_argument){s=t.post_argument}if(t.iframe){if("tagName"in t.iframe){m=t.iframe}else if(typeof t.iframe==="string"){n=t.iframe}}if(typeof t.submit_callback==="function"){c=t.submit_callback}}if(m){q()}else{m=e.getElementById(n);if(m){q()}else{v(D)}}b(L)}function R(e){if(A(e)){B(e.data);_(R)}}function q(){if(!r){r=l(m,"host");if(!r){h("No API hostname is given for Duo to use.  Be sure to pass "+"a `host` parameter to Duo.init, or through the `data-host` "+"attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe")}}if(!u||!d){y(l(m,"sigRequest"));if(!u||!d){h("No valid signed request is given.  Be sure to give the "+"`sig_request` parameter to Duo.init, or use the "+"`data-sig-request` attribute on the iframe element.","https://www.duosecurity.com/docs/duoweb#3.-show-the-iframe")}}if(a===""){a=l(m,"postAction")||a}if(s==="sig_response"){s=l(m,"postArgument")||s}m.src=["https://",r,"/frame/web/v1/auth?tx=",u,"&parent=",encodeURIComponent(e.location.href),"&v=2.3"].join("");E(R)}function B(t){var i=e.createElement("input");i.type="hidden";i.name=s;i.value=t+":"+d;var o=e.getElementById("duo_form");if(!o){o=e.createElement("form");m.parentElement.insertBefore(o,m.nextSibling)}o.method="POST";o.action=a;o.appendChild(i);if(typeof c==="function"){c.call(null,o)}else{o.submit()}}v(L);return{init:L,_parseSigRequest:y,_isDuoMessage:A,_doPostBack:B}}(document,window);
  • duo-wordpress/trunk/duo_wordpress.php

    r1394204 r1476891  
    44Plugin URI: http://wordpress.org/extend/plugins/duo-wordpress/
    55Description: This plugin enables Duo two-factor authentication for WordPress logins.
    6 Version: 2.5.2
     6Version: 2.5.3
    77Author: Duo Security
    88Author URI: http://www.duosecurity.com
  • duo-wordpress/trunk/readme.txt

    r1394204 r1476891  
    22Contributors: duosecurity
    33Tags: authentication, two-factor, authenticator, login, username, password, duo, security
    4 Requires at least: 3.0
     4Requires at least: 4.1
    55Tested up to: 4.5
    6 Stable tag: 2.5.2
     6Stable tag: 2.5.3
    77
    88Easily add Duo Security two-factor authentication to your WordPress website. Enable two-factor authentication for your admins and/or users.
     
    5050
    5151== Changelog ==
     52
     53= 2.5.3 =
     54* Update Duo-Web-v2.js
    5255
    5356= 2.5.2 =
     
    176179
    177180== Upgrade Notice ==
     181
     182= 2.5.3 =
     183* Update Duo-Web-v2.js
    178184
    179185= 2.5.1 =
Note: See TracChangeset for help on using the changeset viewer.