Add Nonce to updating wporg_favorites user meta field

git-svn-id: https://develop.svn.wordpress.org/trunk@37145 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin
2016-03-30 18:35:37 +00:00
parent f1680acb86
commit bd0c3bf0c7
5 changed files with 25 additions and 8 deletions
+2
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 () {