Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/16/2016 07:39:50 PM (8 years ago)
Author:
djpaul
Message:

Support secure cookies.

If the site is served over HTTPS, mark our cookies as secure.

Fixes #6961

Props DJPaul, w3dzign

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-functions.php

    r10585 r10654  
    336336 */
    337337function messages_add_callback_values( $recipients, $subject, $content ) {
    338     @setcookie( 'bp_messages_send_to', $recipients, time() + 60 * 60 * 24, COOKIEPATH );
    339     @setcookie( 'bp_messages_subject', $subject,    time() + 60 * 60 * 24, COOKIEPATH );
    340     @setcookie( 'bp_messages_content', $content,    time() + 60 * 60 * 24, COOKIEPATH );
     338    @setcookie( 'bp_messages_send_to', $recipients, time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
     339    @setcookie( 'bp_messages_subject', $subject,    time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
     340    @setcookie( 'bp_messages_content', $content,    time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
    341341}
    342342
     
    347347 */
    348348function messages_remove_callback_values() {
    349     @setcookie( 'bp_messages_send_to', false, time() - 1000, COOKIEPATH );
    350     @setcookie( 'bp_messages_subject', false, time() - 1000, COOKIEPATH );
    351     @setcookie( 'bp_messages_content', false, time() - 1000, COOKIEPATH );
     349    @setcookie( 'bp_messages_send_to', false, time() - 1000, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
     350    @setcookie( 'bp_messages_subject', false, time() - 1000, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
     351    @setcookie( 'bp_messages_content', false, time() - 1000, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
    352352}
    353353
Note: See TracChangeset for help on using the changeset viewer.