Changeset 12694
- Timestamp:
- 07/29/2020 06:44:23 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-admin.php
r12664 r12694 396 396 case 'ham' : 397 397 /** 398 * Remove moderation and blacklistchecks in case we want to ham an activity398 * Remove moderation and disallowed keyword checks in case we want to ham an activity 399 399 * which contains one of these listed keys. 400 400 */ -
trunk/src/bp-activity/bp-activity-filters.php
r12542 r12694 171 171 172 172 /** 173 * Mark the posted activity as spam, if it contains blacklistkeywords.173 * Mark the posted activity as spam, if it contains disallowed keywords. 174 174 * 175 175 * @since 1.6.0 -
trunk/src/bp-activity/bp-activity-functions.php
r12605 r12694 848 848 * The "context" is the current view type, corresponding roughly to the 849 849 * current component. Use this context to determine which activity actions 850 * should be whitelisted forthe filter dropdown.850 * should be permitted in the filter dropdown. 851 851 * 852 852 * @since 2.8.0 … … 4144 4144 } 4145 4145 4146 // Add "new_post_type_comment" to the whitelisted activity types, so that the activity's Akismet history is generated.4146 // Add "new_post_type_comment" to the allowed activity types, so that the activity's Akismet history is generated. 4147 4147 $post_type_comment_action = $activity_comment_object->action_id; 4148 4148 $comment_akismet_history = function ( $activity_types ) use ( $post_type_comment_action ) { … … 4162 4162 add_action( 'bp_activity_before_save', 'bp_blogs_sync_activity_edit_to_post_comment', 20 ); 4163 4163 4164 // Remove the "new_blog_comment" activity type whitelistso we don't break anything.4164 // Remove the dynamic permitting of the "new_blog_comment" activity type so we don't break anything. 4165 4165 remove_filter( 'bp_akismet_get_activity_types', $comment_akismet_history ); 4166 4166 } -
trunk/src/bp-activity/classes/class-bp-activity-query.php
r11746 r12694 230 230 * Validates a column name parameter. 231 231 * 232 * Column names are checked against a whitelist of known tables.232 * Column names are checked against a list of known tables. 233 233 * See {@link BP_Activity_Query::db_tables}. 234 234 * -
trunk/src/bp-activity/classes/class-bp-akismet.php
r12586 r12694 563 563 $ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' ); 564 564 565 // Loop through _SERVER args and remove whitelisted keys.565 // Loop through _SERVER args and remove specified keys. 566 566 foreach ( $_SERVER as $key => $value ) { 567 567 -
trunk/src/bp-core/bp-core-functions.php
r12691 r12694 516 516 } 517 517 518 // 'register' and 'activate' do not have components, but should be whitelisted.518 // 'register' and 'activate' do not have components, but are allowed as special cases. 519 519 if ( in_array( $component_name, array( 'register', 'activate' ), true ) ) { 520 520 continue; -
trunk/src/bp-core/bp-core-moderation.php
r11447 r12694 142 142 143 143 // Get the moderation keys. 144 $ blacklist= trim( get_option( 'moderation_keys' ) );145 146 // Bail if blacklist is empty.147 if ( ! empty( $ blacklist) ) {144 $disallowed = trim( get_option( 'moderation_keys' ) ); 145 146 // Bail if list is empty. 147 if ( ! empty( $disallowed ) ) { 148 148 149 149 // Get words separated by new lines. 150 $words = explode( "\n", $ blacklist);150 $words = explode( "\n", $disallowed ); 151 151 152 152 // Loop through words. … … 227 227 228 228 // Get the moderation keys. 229 $blacklist = trim( get_option( 'blacklist_keys' ) ); 230 231 // Bail if blacklist is empty. 232 if ( empty( $blacklist ) ) { 229 $disallowed = get_option( 'disallowed_keys' ); 230 231 // Support for WP < 5.5. 232 if ( false === $disallowed ) { 233 $disallowed = get_option( 'blacklist_keys' ); 234 } 235 236 $disallowed = trim( $disallowed ); 237 238 // Bail if disallowed list is empty. 239 if ( empty( $disallowed ) ) { 233 240 return true; 234 241 } … … 263 270 264 271 // Get words separated by new lines. 265 $words = explode( "\n", $ blacklist);272 $words = explode( "\n", $disallowed ); 266 273 267 274 // Loop through words. -
trunk/src/bp-core/classes/class-bp-user-query.php
r12602 r12694 574 574 ), $this ) ); 575 575 576 // We calculate total_users using a standalone query, except 577 // when a whitelist of user_ids is passed to the constructor. 578 // This clause covers the latter situation, and ensures that 579 // pagination works when querying by $user_ids. 576 /* 577 * We calculate total_users using a standalone query, except 578 * when a list of specific user_ids is passed to the constructor. 579 * This clause covers the latter situation, and ensures that 580 * pagination works when querying by $user_ids. 581 */ 580 582 if ( empty( $this->total_users ) ) { 581 583 $this->total_users = count( $wp_user_query->results ); -
trunk/src/bp-groups/bp-groups-functions.php
r12605 r12694 416 416 417 417 /** 418 * Check a group status (eg 'private') against the whitelist of registered statuses.418 * Check a group status (eg 'private') against the list of registered statuses. 419 419 * 420 420 * @since 1.1.0 -
trunk/src/bp-groups/screens/single/admin/group-settings.php
r12381 r12694 27 27 $enable_forum = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0; 28 28 29 // Checked against a whitelistfor security.29 // Checked against a list of allowed statuses for security. 30 30 /** This filter is documented in bp-groups/bp-groups-admin.php */ 31 31 $allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) ); 32 32 $status = ( in_array( $_POST['group-status'], (array) $allowed_status ) ) ? $_POST['group-status'] : 'public'; 33 33 34 // Checked against a whitelistfor security.34 // Checked against a list of allowed statuses for security. 35 35 /** This filter is documented in bp-groups/bp-groups-admin.php */ 36 36 $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) ); -
trunk/src/bp-members/bp-members-functions.php
r12693 r12694 1588 1588 * - Is the email address well-formed? 1589 1589 * - Is the email address already used? 1590 * - If there 's an email domain blacklist, is the current domain on it?1590 * - If there are disallowed email domains, is the current domain among them? 1591 1591 * - If there's an email domain whitelest, is the current domain on it? 1592 1592 * … … 1705 1705 } 1706 1706 1707 // User name can't be on the blacklist.1707 // User name can't be on the list of illegal names. 1708 1708 $illegal_names = get_site_option( 'illegal_names' ); 1709 1709 if ( in_array( $user_name, (array) $illegal_names ) ) { -
trunk/src/bp-members/classes/class-bp-signup.php
r12635 r12694 122 122 * 123 123 * @since 2.0.0 124 * @since 6.0.0 Add s a whitelist of allowed orderby parameters.124 * @since 6.0.0 Added a list of allowed orderby parameters. 125 125 * 126 126 * @param array $args { -
trunk/src/bp-settings/bp-settings-functions.php
r12612 r12694 82 82 83 83 /** 84 * Build a dynamic whitelist ofnotification keys, based on what's hooked to 'bp_notification_settings'.84 * Build a dynamic list of allowed notification keys, based on what's hooked to 'bp_notification_settings'. 85 85 * 86 86 * @since 2.3.5 … … 92 92 ob_start(); 93 93 /** 94 * Fires at the start of the notification keys whitelisting.94 * Fires at the start of the building of the notification keys allowed list. 95 95 * 96 96 * @since 1.0.0 … … 102 102 103 103 if ( $matched && isset( $matches[1] ) ) { 104 $ key_whitelist = $matches[1];104 $allowed_key_list = $matches[1]; 105 105 } else { 106 $ key_whitelist = array();107 } 108 109 return $ key_whitelist;106 $allowed_key_list = array(); 107 } 108 109 return $allowed_key_list; 110 110 } 111 111 -
trunk/src/bp-xprofile/bp-xprofile-filters.php
r12529 r12694 165 165 166 166 /** 167 * Filters profile field values for whitelisted HTML.167 * Filters profile field values for allowed HTML. 168 168 * 169 169 * @since 5.0.0 … … 178 178 179 179 /** 180 * Filters profile field values for whitelisted HTML, when coming from xprofile_get_field_data().180 * Filters profile field values for allowed HTML, when coming from xprofile_get_field_data(). 181 181 * 182 182 * @since 5.0.0 … … 337 337 * 338 338 * Most field values are simply run through esc_html(). Those that support rich text (by default, `textarea` only) 339 * are sanitized using kses, which allows a whitelist of HTML tags.339 * are sanitized using kses, which allows HTML tags from a controlled list. 340 340 * 341 341 * @since 2.4.0 -
trunk/src/bp-xprofile/bp-xprofile-functions.php
r12605 r12694 208 208 * @type int $field_group_id ID of the associated field group. 209 209 * @type int $parent_id Optional. ID of the parent field. 210 * @type string $type Field type. Checked against a field_types whitelist.210 * @type string $type Field type. Checked against a list of allowed field_types. 211 211 * @type string $name Name of the new field. 212 212 * @type string $description Optional. Descriptive text for the field. … … 453 453 } 454 454 455 // For certain fields, only certain parameters are acceptable, so add them to the whitelist.455 // For certain fields, only certain parameters are acceptable, so add them to the list of allowed values. 456 456 if ( $field_type_obj->supports_options ) { 457 457 $field_type_obj->set_whitelist_values( wp_list_pluck( $field->get_children(), 'name' ) ); … … 488 488 } 489 489 490 // Check against a whitelist.490 // Check against a list of registered visibility levels. 491 491 $allowed_values = bp_xprofile_get_visibility_levels(); 492 492 if ( !array_key_exists( $visibility_level, $allowed_values ) ) { -
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r12596 r12694 163 163 $this->field_types = apply_filters( 'xprofile_field_types', array_keys( bp_xprofile_get_field_types() ) ); 164 164 165 // 'option' is a special case. It is not a top-level field, so 166 // does not have an associated BP_XProfile_Field_Type class, 167 // but it must be whitelisted. 165 /* 166 * 'option' is a special case. It is not a top-level field, so 167 * does not have an associated BP_XProfile_Field_Type class, 168 * but it must be explicitly allowed. 169 */ 168 170 $this->field_types[] = 'option'; 169 171 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type.php
r12529 r12694 27 27 28 28 /** 29 * Whitelisted values for field type.30 * 31 * @since 2.0.0 32 * @var array Field type whitelisted values.29 * Allowed values for field type. 30 * 31 * @since 2.0.0 32 * @var array Field type allowed values. 33 33 */ 34 34 protected $validation_whitelist = array(); … … 59 59 60 60 /** 61 * If this is set, BP will set this field type's validation whitelistfrom the field's options (e.g checkbox, selectbox).61 * If this is set, BP will set this field type's list of allowed values from the field's options (e.g checkbox, selectbox). 62 62 * 63 63 * @since 2.0.0
Note: See TracChangeset
for help on using the changeset viewer.