Skip to content

Commit

Permalink
attribute_escape() in nonce AYS
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Feb 27, 2007
1 parent 11f901e commit 58235c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ function wp_nonce_ays($action) {

$adminurl = get_option('siteurl') . '/wp-admin';
if ( wp_get_referer() )
$adminurl = wp_get_referer();
$adminurl = attribute_escape(wp_get_referer());

$title = __('WordPress Confirmation');
// Remove extra layer of slashes.
Expand All @@ -1207,7 +1207,7 @@ function wp_nonce_ays($action) {
$html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n";
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
} else {
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . attribute_escape(add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] )) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
}
$html .= "</body>\n</html>";
wp_die($html, $title);
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// This holds the version number in a separate file so we can bump it without cluttering the SVN

$wp_version = '2.1.1';
$wp_version = '2.1.2-alpha';
$wp_db_version = 4773;

?>

0 comments on commit 58235c4

Please sign in to comment.