• Resolved rjoss

    (@rjoss)


    Looks good and working just fine. My only concern is if the site/page will time out if it remains open for long periods? This would be a big security help for me?

    Thanks for a great plugin

    Richard

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andreas Münch

    (@andreasmuench)

    The cookie saving the password will last 10 days, as defined by WordPress, not this plugin.

    You can change that period with a code snippet added to your functions.php in your theme:

    https://wordpress.stackexchange.com/questions/295152/change-the-default-10-day-expiration-for-the-password-protected-pages-cookie

    This example would save the password only 30 seconds:

    /**
     * Filters the life span of the post password cookie.
     *
     * By default, the cookie expires 10 days from creation. To turn this
     * into a session cookie, return 0.
     *
     * @since 3.7.0
     *
     * @param int $expires The expiry time, as passed to setcookie().
     */
    add_filter( 'post_password_expires', 'wpse_custom_post_password_expires' );
    function wpse_custom_post_password_expires( $expires ) {
        return time() + 30; // Expire in 30 seconds
    }
    Plugin Author Andreas Münch

    (@andreasmuench)

    I´ll mark this as resolved

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘password timeout’ is closed to new replies.