Last active
July 18, 2020 07:45
-
-
Save dgallegos/1a7373002e5f9959315b0a6c31bd72ac to your computer and use it in GitHub Desktop.
WordPress Scan Failed - Non-HttpOnly Session Cookies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fix Trustwave Scan | |
// Non-HttpOnly Session Cookies Identified | |
// When you load the site you will see the security cookie twice, but the scan still passes. | |
function set_wordpress_test_cookie_httponly() { | |
setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, true, true ); | |
} | |
add_action('login_init','set_wordpress_test_cookie_httponly'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment