The nonce tag has no wiki summary.
1
vote
2answers
286 views
How to use nonce with front end submission form?
Thanks to a variety of posts on here I've managed to put together a front end submission form. After about 24 hours of tweaking I've finally got everything working including a redirect to a 'success' ...
0
votes
1answer
64 views
Form Security: nonce vs. jQuery
I am trying to create a methodology for submitting forms on my WordPress site. In the past, I have used WordPress nonces in order to secure form submission, but I like the idea of using jQuery to ...
1
vote
0answers
33 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 ...
3
votes
2answers
46 views
Is it safe to assume that a nonce may be validated more than once?
From what I have gathered, once a nonce is generated it is valid for reuse for the next 48 hours.
Is it safe to code with this in mind? I'm writing a plugin that does a bit of toing and froing with ...
1
vote
1answer
36 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
31 views
Using Nonces for AJAX that only retrieves data
Does it make sense to use a nonce on an AJAX action that only returns data and doesn't alter data on the server side? I understand they are important if you are saving data or changing something on ...
2
votes
1answer
47 views
How to save multiple metaboxes?
I read a tutorial about metaboxes, most of things are clear but I have a question about multiple metaboxes.
My question is about saving, in the tutorial:
<?php
add_action( 'save_post', ...
1
vote
2answers
102 views
Undefined index: at_nonce in custom post metabox
I'm getting this error with my custom post metabox. The custom post and metabox works fine, but if i have debug on and when i try to save any other page or post, i will get an error:
Notice: ...
0
votes
1answer
73 views
Nonce check causing issues when creating new post
I have created a new custom post type and some custom fields for it. My function for saving the custom meta fields fires on the 'save_post' hook.
The problem is that I am getting a warning when I go ...
7
votes
1answer
453 views
How to get a unique nonce for each Ajax request?
I've seen a couple of discussions about getting Wordpress to regenerate a unique nonce for subsequent Ajax requests, but for the life of me I can't actually get Wordpress to do it-- every time I ...
2
votes
1answer
97 views
Nonces can be reused multiple times? Bug / Security issue?
I've read that nonces are meant to be for one time use only, and after an ajax request, you should issue a new nonce so with the next ajax request, a new nonce would be sent to the server.
However, I ...
1
vote
2answers
428 views
wp_verify_nonce not working
I'm working on an ajax request, I have several ajax requests on my functions.php. And all are working, but this:
On my php I have this:
add_action("wp_ajax_fb_points", "get_fb_points");
...
1
vote
0answers
149 views
Security - Ajax and Nonce use [closed]
I'm developing a site which posts a number of ajax calls from jquery to PHP and returns data from PhP to jquery.
Everything is working, but i'd to know if my approach to handling the calls is ok, in ...
0
votes
1answer
153 views
Saving custom data via ajax with nonces
I'm trying to securely save custom data to database from plugin backend via ajax.
JavaScript code that runs after clicking save button:
$.ajax({
url: ajaxVars.ajaxurl,
type: 'post',
...
1
vote
0answers
371 views
How to stop _wpnonce and _wp_http_referer from appearing in URL
I am trying to develop a plug-in that has a search field and uses WP_List_Table.
The plug-in is strictly for the backend and searches the users in the database and returns them along with some other ...
2
votes
2answers
159 views
Nonce best practices: hidden input vs. wp_localize_script?
I noticed while looking at the HTML of an edit page that WordPress uses a lot of hidden input elements for storing nonces. Is there a significant advantage to using either this style of storing ...
0
votes
1answer
376 views
The Correct Way to Use Nonce Field without Settings API
I'm trying to create an admin option page without the Settings API for some reasons. Then if I do so, I've heard that I need to use nonces for security. I'd like to know the correct way to use them.
...
1
vote
1answer
526 views
How to use wp_nonce_url() in a link?
I am creating a plugin to display all posts from all custom post type. It is something like in edit.php, but instead of displaying single post type,I would like to display all posts in one page from ...
0
votes
1answer
100 views
Use of check_admin_referer with theme options and options.php
If I set up a theme options page in the way suggested by the codex (http://codex.wordpress.org/Creating_Options_Pages)
then my form submits to 'option.php'.
settings_fields creates a nonce, which if ...
1
vote
0answers
81 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: ...
2
votes
1answer
430 views
WordPress failure when logging out
I have came across the WordPress logout error several times but I really never figured out the cause of it. In earlier days, it was generally that I was missing a nonce but now even with logout link ...
1
vote
2answers
266 views
How to verify nonce from Bulk/Quick Edit in save_post?
I need to do something specific in my save_post callback for bulk and/or quick edits, so how do I check the nonce for that? I can only find _wpnonce in the edit.php html source, but can't find an ...
1
vote
1answer
182 views
Custom post type: check permissions and validate nonce
I have a custom post type with the following capabilities:
$capabilities = array(
'read_post' => 'administrator',
'read_private_posts' => 'administrator',
'publish_posts' => ...
8
votes
1answer
590 views
wp_verify_nonce vs check_admin_referer
What is the difference, which one should I use?
I know that wp_verify_nonce checks the time limit, and check_admin_referer I think calls wp_verify_nonce as well as checking for an admin url segment, ...
0
votes
1answer
293 views
Public posts - preventing duplicate form submissions
I'm creating a public form on a page that allows non-registered (public) visitors to create posts of a custom post type.
I'm using nonces, which I naiveley thought would expire once they were used. ...
1
vote
2answers
771 views
Do I need a nonce field for every meta box I add to my custom post type admin?
I'm currently working on the admin page of my custom post type, and I got stuck on deciding whether to add a nonce field again for the second metabox or not. I'm very new to custom post types, and ...
0
votes
1answer
707 views
Forms and WordPress Nonce
WordPress nonce is driving me nuts! I had this problem when I started my plugin and removed it but now I have come back to it and still don't know what to do.
I have looked all over for a solution. ...
0
votes
1answer
240 views
wp_nonce_field displaying twice
I have wp_nonce_field in my code but it's creating two instances to the html code for some reason, one where I'd expect it and another at the start of the entry. Is this correct or am I doing ...
2
votes
1answer
264 views
Using nonce external of WP Admin
All,
I've got two wordpress pages. One wordpress page displays a form to do some registration stuff for the website. The second wordpress page actually processes the data and inserts it into a custom ...
3
votes
1answer
668 views
Multiple ajax nonce requests
I have a feature in my current project that will be allow multiple ajax requests - I've got a single nonce request worked out (via this tute), but am somewhat unsure how to figure in multiple nonce ...
6
votes
2answers
494 views
Can I use the same nonce for multiple requests on the same page?
Or does this break the purpose of the nonce, which I admint I don't quite understand it? :)
For example on two ajax requests that run on page load, or when something is clicked:
$.ajax({
type: ...
8
votes
2answers
430 views
Are Nonces Useless?
This is probably a noob question BUT hear me out - isn't the point of using Nonce to protect from things like scrappers (phpcurl scrappers etc.)? But my Nonce prints out in the head of the document ...
2
votes
1answer
840 views
Fatal error: Call to undefined function wp_create_nonce()
I'm trying to add a nonce to my plugin's Ajax. I'm not sure why I'm getting this error:
Fatal error: Call to undefined function wp_create_nonce()
In my php file :
...
0
votes
1answer
388 views
Help with forms and nonces
I am trying to create a nonce to use with a (public-facing) form.
Below is my code:
function my_form() {
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$description = ...
1
vote
2answers
154 views
my theme breaks WP export
I know this is a vague question, please just spend time on it if you are in the mood, I don't need to be flamed for not being more precise.
I'm having a problem with a theme I'm developing, for some ...
0
votes
2answers
883 views
Ajax function returns -1
I have a question.
I made a simply ajax function.
When I'm logged in, it works perfectly.
When I'm logged out, it returns me -1 (since Wordpress 3.1)
Why ? I don't understand.
Precisely, it returns ...



