<?php
/******************************************************************************
Plugin Name: PoC ticket 43723
Plugin URI: https://burobjorn.nl
Description: PoC shows not user_contactmethods data is not properly escaped 
Version: 1.0
Author: Bjorn Wijers <burobjorn at burobjorn dot nl>
Author URI: https://burobjorn.nl
License: GPLv2 or later
******************************************************************************/

if( ! function_exists('poc_43723') ) {
  function poc_43723( $methods ) {
    if( is_array( $methods) ) {
      $unsafe_data = array('test"><script>alert(\'If you can read this, data was not properly escaped\');</script>' => 'PoC-43723' ); 
      return array_merge( $methods, $unsafe_data);
    }
    return $methods;
  }
  add_filter('user_contactmethods', 'poc_43723'); 
}
?>
