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
Plugin Security
Search
Brad Parbs
July 26, 2014
Technology
3
110
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
600
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
150
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
280
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
360
WordCamp Baltimore - Let's Get Sassy!
bradp
2
370
Starter Themes for Appleton WordPress Meetup
bradp
1
130
#WCGR - Getting SASSy
bradp
4
250
#WCPVD - Getting SASSy
bradp
2
250
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
140
Other Decks in Technology
See All in Technology
ここはMCPの夜明けまえ
nwiizo
32
13k
製造業向けIoTソリューション提案資料.pdf
haruki_uiru
0
160
バクラクの認証基盤の成長と現在地 / bakuraku-authn-platform
convto
4
900
Winning at PHP in Production in 2025
beberlei
1
270
LINE 購物幕後推手
line_developers_tw
PRO
0
340
地味にいろいろあった! 2025春のAmazon Bedrockアップデートおさらい
minorun365
PRO
2
560
Part2 GitHub Copilotってなんだろう
tomokusaba
0
260
Асинхронная коммуникация в Go: от понятного к душному. Дима Некрасов, Otello, 2ГИС
lamodatech
0
1.8k
DjangoCon Europe 2025 Keynote - Django for Data Science
wsvincent
0
470
コスト最適重視でAurora PostgreSQLのログ分析基盤を作ってみた #jawsug_tokyo
non97
2
860
Web Intelligence and Visual Media Analytics
weblyzard
PRO
1
6k
今日からはじめるプラットフォームエンジニアリング
jacopen
8
1.9k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
830
Being A Developer After 40
akosma
91
590k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
We Have a Design System, Now What?
morganepeng
52
7.5k
Producing Creativity
orderedlist
PRO
344
40k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.4k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Music & Morning Musume
bryan
47
6.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
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