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
0
760
Escape From New York
A talk on escaping and security in WordPress and PHP
Tom J Nowell
November 01, 2015
Tweet
Share
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
92
REST APIs for Absolute Beginners
tarendai
0
1k
VVV 2
tarendai
0
810
WordCamp Europe 2016 - Handling Anxiety
tarendai
1
510
WP The Right Way
tarendai
0
1.1k
Code Deodorant 2014
tarendai
1
760
Adv WP CLI
tarendai
0
740
WP CLI
tarendai
0
700
Other Decks in Technology
See All in Technology
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Context Engineeringの取り組み
nutslove
0
360
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
640
Webhook best practices for rock solid and resilient deployments
glaforge
2
300
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
580
OpenShiftでllm-dを動かそう!
jpishikawa
0
130
レガシー共有バッチ基盤への挑戦 - SREドリブンなリアーキテクチャリングの取り組み
tatsukoni
0
220
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
590
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
160
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
250
Writing Fast Ruby
sferik
630
62k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
Accessibility Awareness
sabderemane
0
53
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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