Making WordPress.org

Changeset 9329


Ignore:
Timestamp:
12/11/2019 04:47:31 PM (7 years ago)
Author:
iandunn
Message:

O2 Follow: Add warning about using data in other contexts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/class-o2-follow.php

    r8145 r9329  
    1717
    1818        // Use the old p2 meta key, for backwards compatibility.
     19        // Warning: Be careful using this in other contexts. See `subscribe_to_comments()` for details.
    1920        const USER_META_KEY = 'jpflfp2_posts_following';
    2021
    … …  
    311312                $subscribed_ids   = array_unique( $subscribed_ids );
    312313
     314                /*
     315                 * Warning: Be careful when using this data in any other context. It's not indexed by blog ID, so there's
     316                 * no way to know which post it actually refers to.
     317                 *
     318                 * For example, if you were to use it to email comment notifications to followers of a private post, you
     319                 * would also be emailing followers of posts on other sites which happened to have the same post ID, and
     320                 * would expose any sensitive information in those comments to random people who otherwise wouldn't have
     321                 * access to it.
     322                 */
    313323                update_user_meta( $current_user->ID, self::USER_META_KEY, $subscribed_ids );
    314324        }
Note: See TracChangeset for help on using the changeset viewer.