• Resolved kioskkeith

    (@kioskkeith)


    Hi all,

    Does anyone know how often the Loco-nonce security check refreshes? I’m using Loco to modify some system text which is working fine as it should. However it appears that you can only do a few changes per session before the Loco-nonce kicks in and prevents you from making further changes. Alternatively, is it possible as a user with back end and server access to temporarily disable this feature?

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    My plugin uses wp_create_nonce and wp_verify_nonce.

    I can’t answer your question with certainty, as all of this is taken care of by WordPress, but looking at the code in wp_verify_nonce it seems that it should last 24 hours maximum.

    I’ve not experienced the problem you’re describing, but I can tell you that the Loco Translate editor uses Ajax, and the nonce is preloaded into the browser. So, without a page refresh, you won’t get a new nonce. So I suppose if you left the editor page open all day, then this could happen. I can only suggest you reload the page if you come back to it after a long idle period.

    I can look at regenerating the nonce after each save, but I’ve not been given cause to until now.

    Rather than disable it, it looks like you can control nonce_life with a filter.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.