Skip to content

Instantly share code, notes, and snippets.

From 6fe847423069d9bed7e6bc6c4fb4a9a12687c562 Mon Sep 17 00:00:00 2001
From: Tom Adams <[email protected]>
Date: Tue, 4 Mar 2014 15:36:16 -0500
Subject: [PATCH] s/$_POST/stripslashes_deep($_POST)/
---
by-email/by-email.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/by-email/by-email.php b/by-email/by-email.php
@mallorydxw
mallorydxw / gist:2c6de4e8ce361c0b7613
Created July 10, 2015 15:03
Bookmarklet to disable form validation
javascript:var f=document.querySelectorAll('form');for(var i=0;i<f.length;i++){f[i].noValidate=true}
@mallorydxw
mallorydxw / .js
Created August 24, 2015 14:39
A bookmarklet that sets .noValidate=true on all forms in a page
javascript:var f=document.querySelectorAll('form');for(var i=0;i<f.length;i++){f[i].noValidate=true}
<?php
/*
* Plugin Name: CSP
* Description: Uses inline_js() to make CSP happen
*/
add_filter('inline_js_attributes', function ($attr) {
$nonce = wp_create_nonce('csp');
return $attr . ' nonce="'.esc_attr($nonce).'" ';
<?php
/*
Plugin name: SameSite Cookies
Description: A WordPress plugin for using SameSite=Lax with auth cookies
*/
add_filter('send_auth_cookies', function () {
return false;
});