Skip to content

Commit

Permalink
Plugin ready
Browse files Browse the repository at this point in the history
  • Loading branch information
kkarpieszuk committed Jun 26, 2018
1 parent 6832c67 commit 5ebad54
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rips_hotfix.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/*
Plugin name: Ripstech Zerdoday Hotfix
Description: See <a href='https://blog.ripstech.com/2018/wordpress-file-delete-to-code-execution/'>Ripstech blogpost</a> for details.
Author: Konrad Karpieszuk, but code creds go to Ripstech
Version: 0.1
*/

add_filter( 'wp_update_attachment_metadata', 'rips_unlink_tempfix' );

function rips_unlink_tempfix( $data ) {
if( isset($data['thumb']) ) {
$data['thumb'] = basename($data['thumb']);
}

return $data;
}

0 comments on commit 5ebad54

Please sign in to comment.