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
Plugin Security
Search
Brad Parbs
July 26, 2014
Technology
170
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Plugin Security
Brad Parbs
July 26, 2014
More Decks by Brad Parbs
See All by Brad Parbs
Learn to Love the Terminal
bradp
0
750
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
200
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
360
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
450
WordCamp Baltimore - Let's Get Sassy!
bradp
2
550
Starter Themes for Appleton WordPress Meetup
bradp
1
220
#WCGR - Getting SASSy
bradp
4
310
#WCPVD - Getting SASSy
bradp
2
330
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
200
Other Decks in Technology
See All in Technology
React改造してみた
tsukina_7mochi
0
140
Getting Started with Google Antigravity
glaforge
0
340
Refining Active Record
shugo
0
180
hackers_champloo_2026_tidb
makocchi
0
170
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
310
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
330
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
210
How to Design Configuration for Rails Applications
willnet
1
930
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
170
Metadata - Section 1: HTML Basics
mohab1
0
140
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
1k
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
790
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
A Tale of Four Properties
chriscoyier
163
24k
Chasing Engaging Ingredients in Design
codingconduct
0
370
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Everyday Curiosity
cassininazir
0
360
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
エンジニアに許された特別な時間の終わり
watany
109
250k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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