{"id":7117,"date":"2022-11-17T19:10:33","date_gmt":"2022-11-17T17:10:33","guid":{"rendered":"https:\/\/mummila.net\/kommentit\/?p=7117"},"modified":"2022-11-17T19:10:33","modified_gmt":"2022-11-17T17:10:33","slug":"security-check-failed-if-session-expires-during-editing","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2022\/11\/17\/security-check-failed-if-session-expires-during-editing\/","title":{"rendered":"&#8221;Security check failed&#8221; if session expires during editing"},"content":{"rendered":"<p>Plugin version: 3.6.2<\/p>\n<p>This is similar to <a href=\"https:\/\/wordpress.org\/support\/topic\/security-check-failed-14\/\">one previously reported issue<\/a>, but I have a specific situation where this occurs (and appears to be 100 % reproducible):<\/p>\n<p>1. Start editing an article<br \/>\n2. Have your session cookie expire (to simulate, you can delete the cookie in browser settings)<br \/>\n3. Continue editing the article, or just wait until the next heartbeat, to have the login form pop up<br \/>\n4. Fill in the login form (over the editor) to log back in<br \/>\n5. Click Save draft<\/p>\n<p>Result is the &#8221;WP to Twitter: Security check failed&#8221; error page.<\/p>\n<p>Thankfully, the draft has still been saved, and going back to the editor (using the browser&#8217;s back button) restores it. Also the next attempt to Save draft goes through without issues2 (I&#8217;ve only tried this using Firefox though, and can&#8217;t say if it&#8217;s as harmless in other browsers).<\/p>\n<p>I haven&#8217;t looked at the code, but if the issue is caused by nonce invalidation at step 2, the plugin should probably update its nonce(s) when login-related hooks fire after step 3.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If the issue is caused by nonce invalidation at step 2, the plugin should probably update its nonce(s) when login-related hooks fire after step 3.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1097],"tags":[2965],"class_list":["post-7117","post","type-post","status-publish","format-standard","hentry","category-keskustelupalstat","tag-wordpress","sijainti-wordpress-support-forums"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=7117"}],"version-history":[{"count":1,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7117\/revisions"}],"predecessor-version":[{"id":7118,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/7117\/revisions\/7118"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=7117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=7117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=7117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}