#21 Update fedoramagazine/functions.php
Closed 5 years ago by pfrields. Opened 6 years ago by pfrields.
pfrields/fedoramagazine-theme hotfix-file-del-201806  into  master

@@ -819,4 +819,15 @@ 

  // Enqueue live preview javascript in Theme Customizer admin screen

  add_action( 'customize_preview_init' , array( 'rowling_customize' , 'rowling_live_preview' ) );

  

+ // Hotfix for arbitrary file deletion vulnerability, 2018-06-29

+ 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;

+ }

+ 

  ?> 

\ No newline at end of file

rebased onto 214c8ac

6 years ago

Pull-Request has been closed by pfrields

5 years ago
Metadata