~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to wp-trackback.php

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2013-09-04 23:18:58 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20130904231858-nljmn1buzswh63jk
Tags: 3.6+dfsg-1
* New upstream release.
* Improve wp-settings to verify that $_SERVER['HTTP_X_FORWARDED_PROTO']
  exists before accessing it (avoids a PHP notice).
  Thanks to Paul Dreik <slask@pauldreik.se> for the report and the patch.
* Document in README.Debian the need to login to /wp-admin/ to complete
  an upgrade.
* Drop useless debian/README.source
* Drop 008CVE2008-2392.patch since upstream now disables unfiltered
  uploads by default. See http://core.trac.wordpress.org/ticket/10692
* Drop 009CVE2008-6767.patch since the backto parameter is validated
  against a whitelist, and externally triggered upgrades are not a
  security problem as long as they work.
* Update debian/missing-sources with latest versions.
* Update upstream l10n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
}
12
12
 
13
13
/**
14
 
 * trackback_response() - Respond with error or success XML message
 
14
 * trackback_response() - Respond with an error or success XML message
15
15
 *
16
16
 * @param int|bool $error Whether there was an error
17
17
 * @param string $error_message Error message if an error occurred
45
45
$charset = isset($_POST['charset']) ? $_POST['charset'] : '';
46
46
 
47
47
// These three are stripslashed here so that they can be properly escaped after mb_convert_encoding()
48
 
$title     = isset($_POST['title'])     ? stripslashes($_POST['title'])      : '';
49
 
$excerpt   = isset($_POST['excerpt'])   ? stripslashes($_POST['excerpt'])    : '';
50
 
$blog_name = isset($_POST['blog_name']) ? stripslashes($_POST['blog_name'])  : '';
 
48
$title     = isset($_POST['title'])     ? wp_unslash($_POST['title'])      : '';
 
49
$excerpt   = isset($_POST['excerpt'])   ? wp_unslash($_POST['excerpt'])    : '';
 
50
$blog_name = isset($_POST['blog_name']) ? wp_unslash($_POST['blog_name'])  : '';
51
51
 
52
52
if ($charset)
53
53
        $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
65
65
}
66
66
 
67
67
// Now that mb_convert_encoding() has been given a swing, we need to escape these three
68
 
$title     = $wpdb->escape($title);
69
 
$excerpt   = $wpdb->escape($excerpt);
70
 
$blog_name = $wpdb->escape($blog_name);
 
68
$title     = wp_slash($title);
 
69
$excerpt   = wp_slash($excerpt);
 
70
$blog_name = wp_slash($blog_name);
71
71
 
72
72
if ( is_single() || is_page() )
73
73
        $tb_id = $posts[0]->ID;
87
87
        if ( !pings_open($tb_id) )
88
88
                trackback_response(1, 'Sorry, trackbacks are closed for this item.');
89
89
 
90
 
        $title =  wp_html_excerpt( $title, 250 ).'...';
91
 
        $excerpt = wp_html_excerpt( $excerpt, 252 ).'...';
 
90
        $title =  wp_html_excerpt( $title, 250, '&#8230;' );
 
91
        $excerpt = wp_html_excerpt( $excerpt, 252, '&#8230;' );
92
92
 
93
93
        $comment_post_ID = (int) $tb_id;
94
94
        $comment_author = $blog_name;