Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Escape From New York
Search
Tom J Nowell
November 01, 2015
Technology
850
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Escape From New York
A talk on escaping and security in WordPress and PHP
Tom J Nowell
November 01, 2015
Transcript
28 slides
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
More Decks by Tom J Nowell
See All by Tom J Nowell
Using Blocks Outside The Editor
tarendai
0
1.2k
Composer_and_WordPress__1_.pdf
tarendai
0
100
REST APIs for Absolute Beginners
tarendai
0
1.1k
VVV 2
tarendai
0
950
WordCamp Europe 2016 - Handling Anxiety
tarendai
1
620
WP The Right Way
tarendai
0
1.2k
Code Deodorant 2014
tarendai
1
860
Adv WP CLI
tarendai
0
820
WP CLI
tarendai
0
790
Other Decks in Technology
See All in Technology
Dark Web - Como o Cibercrime Opera na Internet
nicholsjasper
0
120
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
170
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.2k
gradle-best-practices 使ってみた
mikanichinose
0
230
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
230
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
290
技術書典で本を売る流れ
yoshimura_datam
0
170
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
4
1.3k
新規事業開発でのAWS活用成功談&失敗談! 〜新規事業開発を専門に行うRelicならではのAWS活用〜
amixedcolor
1
150
Webメール開発を大幅に変えたJMAPというゲームチェンジャー
tascript
9
4.4k
メディアアートを〈拡張〉する——器官学と個体化論を手がかりに
_kotobuki_
0
330
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
3
270
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.6k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
43k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
700
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
160
Ruling the World: When Life Gets Gamed
codingconduct
0
450
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
RailsConf 2023
tenderlove
30
1.6k
How to Talk to Developers About Accessibility
jct
2
630
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
320
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k