The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
53 views

Can you have more than one nonce on a page?

I have a site with a page where there's one form in the sidebar, and one in the main body of the page. The sidebar comes first in the HTML. Both forms have their own nonces (generated with ...
1
vote
1answer
128 views

Why does Wordpress Heartbeat login not refresh the nonces?

Here's an interesting experiment: Go to wordpress plugins listing page, notice the activate, deactivate links all have a nonce part in the request. In a second tab, log out of the site, and go back ...
1
vote
1answer
138 views

wp_verify_nonce doesn't return true on server when it matches the nonce

$.ajax({ type: "POST", dataType: "text", url: ajaxurl, data: { action: "more_news", nonce: nonce, offset: offset }, success : function(data, ...
0
votes
1answer
27 views

Nonce and widget

I've been screening the code of several widget and haven't found any one of them handling nonce. I also took a look at the WP_Widget class and found nothing about it as well. This is from the codex: ...
0
votes
1answer
33 views

Nonce fail after second submit attempt

I am refactoring my plugin that resets the WordPress database tables back to their defaults and came across an issue. The form submission itself works fine. However, after the first submit, and if ...
0
votes
1answer
36 views

custom metabox nonce verification fails

I'm adding a metabox on a custom post type and my nonce-verification fails. I'm not really where to look for why it's going wrong. Can anyone point me in the right direction? Here's my code: function ...
0
votes
1answer
152 views

How can I create a plugin installation link?

Currently, my code is generating the wrong nonce, I guess. Here is the code: $action = 'install-plugin'; $plugin = 'akismet'; wp_nonce_url( add_query_arg( array( 'action' ...
0
votes
1answer
221 views

Using Nonce for my Form

Essentially I need to verify my data using a nonce, but I'm not sure that I'm doing it right. What I'm trying to do is remove a menu option for a user that isn't an admin. If a checkbox is checked and ...
2
votes
0answers
90 views

AJAX requests broken due to HTTPS for wp-admin

I have my wp-admin section forced to HTTPS via a plugin. I also have specific pages that are using https on the frontend (login, billing, etc.) I seem to be having an issue with HTTP pages using AJAX ...
1
vote
0answers
167 views

Bypass nonce value while trashing a post

I want to move a post in trash but the condition is that simultaneously I need to delete some more posts. Sample Code: jQuery(function($) { $('#delete-action a').unbind(); $('#delete-action ...
1
vote
0answers
97 views

My custom write panels won't save data. What am I missing?

So far I've been reading some tutorials about ways to create Custom Write Panels. It seems that none of them will really work without some bug. I'd like to discuss one of those tuts here: ...
0
votes
0answers
43 views

External request to Wordpress WP-API - Basic Authentication

I'm trying to hit my Wordpress API using Basic Auth with Guzzle (http tool) from my middleware (Laravel). $username = 'myAdminUserName'; $password = 'myAdminPassword'; $uri = ...
0
votes
0answers
15 views

Using wp_nonces in email links?

I would love to be able to use nonces in email links (sent out to a list of people via email to subscribe to comment notifications) My idea was to use: $Link = get_site_url() . $url_endpoint . ...
0
votes
0answers
17 views

Is it possible to use nonce server side?

I would like to create a security hash and pass it to an url as a parameter: http://example.com/somefolder/dostuff.php?nonce=hash In dostuff.php, validate the nonce hash. I can do this for logged ...
0
votes
0answers
90 views

How to use nonces for frontend AJAX voting if the page gets cached?

I'm building a custom voting solution for my site that would allow public AJAX voting on multiple posts per page. Votes can be added/changed/revoked. Values are stored in custom post meta. I ...
0
votes
0answers
31 views

One nonce for multiple forms that use the same PHP file

Here's the form that appears in multiple places with differing fields... <form method="post" action="save-settings.php"> FORM FIELDS HERE <?php wp_nonce_field( 'mynonce' ); ?> ...
0
votes
0answers
62 views

Are nonce really needed in frontent AJAX?

While doing some Wordpress development, I found that many frontend plugins, like contact forms, are using nonce values. Are they really needed? From security point they don't do much, as scraper can ...
0
votes
0answers
29 views

Is it good practice to use WordPress nonce values to restrict page access?

I'm working with a colleague on a WordPress plugin. Part of the plugin functionality is showing dynamic lists with links which allow you to open a new page. Depending on the user's role, they may or ...
0
votes
0answers
24 views

WP Meta Box Not Saving

I've been trying to get this custom meta box to save but it is not working. I've browsed around but still haven't found a solution that works. function add_link_box() { add_meta_box( ...
0
votes
0answers
260 views

Create nonce in frontend page to edit profile

I am trying to create a frontend edit profile form that mimics the wp-admin backend edit profile. I created the form as HTML directly in a WordPress page (I'm a PHP/WordPress beginner, so I don't know ...
0
votes
0answers
365 views

Nonces and Cache

It's clear that form submissions and AJAX requests, especially sensible ones, need "nonces" to avoid certain exploits. However, with heavy use of caching systems it becomes harder to generate them ...
0
votes
0answers
101 views

when saveing $meta_box i get Undefined index error

I need help to fix these Notices: PHP Notice: Undefined index: person-name in testimonials.php on line 112 PHP Notice: Undefined index: position in testimonials.php on line 112 PHP Notice: Undefined ...