Add Nonce to updating wporg_favorites user meta field

Built from https://develop.svn.wordpress.org/trunk@37145


git-svn-id: http://core.svn.wordpress.org/trunk@37112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin
2016-03-30 18:36:26 +00:00
parent 9b7a775413
commit bd7ffca854
7 changed files with 27 additions and 10 deletions

View File

@@ -1548,6 +1548,7 @@ themes.view.Installer = themes.view.Appearance.extend({
// Save the user's WordPress.org username and get his favorite themes.
saveUsername: function ( event ) {
var username = $( '#wporg-username-input' ).val(),
nonce = $( '#wporg-username-nonce' ).val(),
request = { browse: 'favorites', user: username },
that = this;
@@ -1562,6 +1563,7 @@ themes.view.Installer = themes.view.Appearance.extend({
return wp.ajax.send( 'save-wporg-username', {
data: {
_wpnonce: nonce,
username: username
},
success: function () {