This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gana un iphone!</title> | |
</head> | |
<body> | |
<form action="http://www.soyjaimito.com/wp-admin/admin-ajax.php" id="esto-pica" method="post"> | |
<input type="hidden" name="text" value="Hola, necesito ayuda con vuestro plugin. Se me ha roto, ¿Podríais enviarme mis datos privados ya de paso? Es que he perdido la contraseña"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Un ejemplo de plugin con un problema de CSRF | |
*/ | |
add_action( 'init', 'wp_ajax_envia_email_a_soporte' ); | |
function wp_ajax_envia_email_a_soporte() { | |
$text = $_POST['text']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Un ejemplo de plugin con un problema de CSRF | |
*/ | |
add_action( 'init', 'maybe_delete_user' ); | |
function maybe_delete_user() { | |
if ( isset( $_POST['action'] ) && $_POST['action'] === 'delete-user' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gana un iphone!</title> | |
</head> | |
<body> | |
<form action="http://www.soyjaimito.com" id="esto-pica" method="post"> | |
<input type="hidden" name="user_id" value="1"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Un ejemplo de plugin con un problema de CSRF | |
*/ | |
add_action( 'init', 'maybe_delete_user' ); | |
function maybe_delete_user() { | |
if ( isset( $_POST['action'] ) && $_POST['action'] === 'delete-user' ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rm () { | |
local path | |
for path in "$@"; do | |
# ignore any arguments | |
if [[ "$path" = -* ]]; then : | |
else | |
local dst=${path##*/} | |
# append the time if necessary | |
while [ -e ~/.Trash/"$dst" ]; do | |
dst="$dst "$(date +%H-%M-%S) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the http module to create an http server. | |
var http = require('http'); | |
var execFile = require('child_process').execFile; | |
var exec = require('child_process').exec; | |
var mozjpeg = require('mozjpeg'); | |
// Configure our HTTP server to respond with Hello World to all requests. | |
var server = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function yell_is_knowledge_post( $post_id ) { | |
$categories = get_the_category( $post_id ); | |
if ( in_array( 'knowledge', wp_list_pluck( $categories, 'slug' ), true ) ) { | |
return true; | |
} | |
$knowledge_cat = get_term_by( 'slug', 'knowledge', 'category' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require( 'path' ); | |
// Configuración común para desarrollo y producción | |
var config = { | |
entry: [ | |
'./src/index.js' | |
], | |
output: { | |
filename: 'app.js', | |
path: path.resolve( __dirname, 'build' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require( 'path' ); | |
module.exports = { | |
entry: [ | |
'./src/index.js' | |
], | |
output: { | |
filename: 'app.js', | |
path: path.resolve( __dirname, 'build' ) | |
}, |