Ticket #2764: 2764-2.0.diff

File 2764-2.0.diff, 1.3 KB (added by mdawaffe, 6 years ago)

branches/2.0

  • wp-includes/pluggable-functions.php

     
    243243                        $q = explode( ini_get('arg_separator.output'), $q); 
    244244                        $html .= "\t<form method='post' action='$pagenow'>\n"; 
    245245                        foreach ( (array) $q as $a ) { 
    246                                 $v = substr(strstr($a, '='), 1); 
    247                                 $k = substr($a, 0, -(strlen($v)+1)); 
     246                                list($k, $v) = explode('=', $a, 2); 
    248247                                $html .= "\t\t<input type='hidden' name='" . wp_specialchars( urldecode($k), 1 ) . "' value='" . wp_specialchars( urldecode($v), 1 ) . "' />\n"; 
    249248                        } 
    250249                        $html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n"; 
  • wp-admin/post.php

     
    322322 
    323323case 'editedcomment': 
    324324 
    325         $comment_id = (int) $_POST['comment_ID']; 
    326         check_admin_referer('update-comment_' . $comment_id); 
     325        $comment_ID = (int) $_POST['comment_ID']; 
     326        $comment_post_ID = (int)  $_POST['comment_post_ID']; 
    327327 
     328        check_admin_referer('update-comment_' . $comment_ID); 
     329 
    328330        edit_comment(); 
    329331 
    330332        $referredby = $_POST['referredby'];