Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Escape From New York
Search
Tom J Nowell
November 01, 2015
Technology
790
0
Share
Escape From New York
A talk on escaping and security in WordPress and PHP
Tom J Nowell
November 01, 2015
More Decks by Tom J Nowell
See All by Tom J Nowell
Using Blocks Outside The Editor
tarendai
0
1.1k
Composer_and_WordPress__1_.pdf
tarendai
0
96
REST APIs for Absolute Beginners
tarendai
0
1k
VVV 2
tarendai
0
840
WordCamp Europe 2016 - Handling Anxiety
tarendai
1
550
WP The Right Way
tarendai
0
1.1k
Code Deodorant 2014
tarendai
1
800
Adv WP CLI
tarendai
0
770
WP CLI
tarendai
0
730
Other Decks in Technology
See All in Technology
20260515 OpenIDファウンデーション・ジャパンご紹介
oidfj
0
230
R&D 祭 2024 アニメエフェクト作成の効率化
olmdrd
PRO
0
100
M&Aで増え続けるプロダクトに少数QAはどう立ち向かうか─GENDAが挑む、全員で取り組む品質標準化戦略 / GENDA Tech Talk #4
genda
0
210
Purview 勉強会報告 Microsoft Purview 入門しようとしてみた
masakichixo
1
450
ECSのTerraformモジュールにコントリビュートした話
harukasakihara
0
240
freeeで運用しているAIQAについて
qatonchan
1
650
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
260
TSKaigi 2026 - enumよ、さようなら
teamlab
PRO
1
160
障害対応のRunbookは作った、でも本当に動くの? AWS FIS で EKS の AZ 障害を再現してみた
tk3fftk
0
120
業務に残された「良くない型」で考える「TypeScriptの難しさ」
sajikix
2
560
Loadbalancing exporter internals
ymotongpoo
1
110
クラウドネイティブ DB はいかにして制約を 克服したか? 〜進化歴史から紐解く、スケーラブルアーキテクチャ設計指針〜
hacomono
PRO
6
1.1k
Featured
See All Featured
A Soul's Torment
seathinner
6
2.8k
Agile that works and the tools we love
rasmusluckow
331
21k
The Language of Interfaces
destraynor
162
26k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
300
The Invisible Side of Design
smashingmag
302
52k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
Being A Developer After 40
akosma
91
590k
How to build a perfect <img>
jonoalderson
1
5.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Transcript
Escape From New York Tom J Nowell
Validation Sanitisation Escaping
Validation: Is this what it claims to be?
Sanitisation: Lets clean up this input
Escaping: Making output safe
WordPress.com VIP VIP Wrangler - @tarendai
'; DROP TABLE votes'
Search Results For: <?php echo $_GET[‘s’]; ?>
Search Results For: <?php echo $_GET [‘s’]; ?>
<b>Test</b>
<b>Test</b>
<script>alert(“hey”);</script>
Search Results For: <?php echo esc_html( $_GET[‘s’] ); ?>
Search Results For: <?php echo esc_html( $_GET[‘s’] ); ?>
How to Escape
Sanitize early Escape Late Escape Often
No Data is Safe
<script src='//peniscorp.com/topkek.js'> </script>
Escape Everything..?
echo $var; echo esc_html( $var );
class=”<?php echo $css; ?>” class=”<?php echo esc_attr( $css ); ?>”
href=”<?php echo $url; ?>” href=”<?php echo esc_url( $url ); ?>”
wp_kses & wp_kses_post
echo apply_filters( ‘the_content’ wp_kses_post( $content ) );
tomjn.com/escaping
WordPress.com VIP VIP Wrangler - @tarendai
automattic.com/work-with-us/vip-wrangler/
Questions? Tom J Nowell - WordPress.com VIP @tarendai - tomjn.com