Skip to content

Commit

Permalink
Merge pull request #404 from InstaWP/86cxc2djx-fix-pop-chain-vulnerab…
Browse files Browse the repository at this point in the history
…ility

fix php cs
  • Loading branch information
iamsayan authored Jan 15, 2025
2 parents f5b9a75 + 6a42f06 commit a754832
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions includes/Extension/SearchReplace/Replace/class-sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,11 @@ public function get_edit_url() {
public function recursive_unserialize_replace( $from = '', $to = '', $data = '', $serialised = false ) {
// Some unserialised data cannot be re-serialised eg. SimpleXMLElements.
global $wpdb;

try {
$unserialized = false;
if ( ! empty( $data ) && ( $wpdb->prefix . 'comments' !== $this->table_name || 'comment_content' !== $this->column_name ) && is_serialized( $data ) ) {
$unserialized = @unserialize( $data, array( 'allowed_classes' => false ) );
}

if ( is_string( $data ) && false !== $unserialized ) {
$data = $this->recursive_unserialize_replace( $from, $to, $unserialized, true );
} elseif ( is_array( $data ) ) {
Expand Down

0 comments on commit a754832

Please sign in to comment.