$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Plugin Security
Search
Brad Parbs
July 26, 2014
Technology
3
140
Plugin Security
Brad Parbs
July 26, 2014
Tweet
Share
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
670
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
170
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
310
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
390
WordCamp Baltimore - Let's Get Sassy!
bradp
2
460
Starter Themes for Appleton WordPress Meetup
bradp
1
170
#WCGR - Getting SASSy
bradp
4
270
#WCPVD - Getting SASSy
bradp
2
280
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
160
Other Decks in Technology
See All in Technology
オープンデータの内製化から分かったGISデータを巡る行政の課題
naokim84
2
1.3k
ECMAScript仕様の最新動向: プロセスの変化と仕様のトレンド
uhyo
1
300
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
9.8k
タグ付きユニオン型を便利に使うテクニックとその注意点
uhyo
1
400
【保存版】「ガチャ」からの脱却:Gemini × Veoで作る、意図を反映するAI動画制作ワークフロー
nekoailab
0
130
ブラウザ拡張のセキュリティの話 / Browser Extension Security
flatt_security
0
240
小規模チームによる衛星管制システムの開発とスケーラビリティの実現
sankichi92
0
180
20251127 BigQueryリモート関数で作る、お手軽AIバッチ実行環境
daimatz
0
410
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
21k
GitHub を組織的に使いこなすために ソニーが実践した全社展開のプラクティス
sony
20
11k
Digital omtanke på Internetdagarna 2025
axbom
PRO
0
160
進化の早すぎる生成 AI と向き合う
satohjohn
0
470
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
697
190k
Unsuck your backbone
ammeep
671
58k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
GitHub's CSS Performance
jonrohan
1032
470k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Facilitating Awesome Meetings
lara
57
6.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Rails Girls Zürich Keynote
gr2m
95
14k
Side Projects
sachag
455
43k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
690
Transcript
Security for Your Plugins
I’m Brad Parbs.
Nathan, you should watch Band of Brothers.
Let’s talk about what sucks in WordPress.
None
None
“20% of the 50 most popular WordPress plugins are vulnerable
to common Web attacks. This amounts to nearly 8 million downloads of vulnerable plugins.” Checkmarx, an application security company
Things that happen when your stuff isn’t secure.
None
How do we make sure this doesn’t happen?
Always develop with debugging ON
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'WP_CACHE', false );
Sanitize all the things
intval(); absint();
wp_kses();
sanitize_title();
sanitize_email() sanitize_file_name() sanitize_html_class() sanitize_key() sanitize_meta()
sanitize_mime_type() sanitize_option() sanitize_sql_orderby() sanitize_post_field() sanitize_text_field() sanitize_title() sanitize_title_for_query() sanitize_title_with_dashes() sanitize_user()
Escape all the things
esc_html();
esc_textarea();
esc_attr();
esc_url();
http://codex.wordpress.org/Data_Validation
Database Queries
$wpdb-‐>insert();
$wpdb-‐>update();
$wpdb-‐>prepare();
Nonces
wp_nonce_url();
wp_nonce_field();
wp_create_nonce();
check_admin_referer();
wp_verify_nonce();
Remote Data
CURL is bad.
For real, CURL is bad.
wp_remote_get();
wp_remote_post();
wp_remote_request();
Check capabilities & roles
current_user_can();
Use native functions
A story about TimThumb
Questions?
None