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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Brad Parbs
July 26, 2014
Technology
3
150
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
690
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
180
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
320
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
410
WordCamp Baltimore - Let's Get Sassy!
bradp
2
500
Starter Themes for Appleton WordPress Meetup
bradp
1
180
#WCGR - Getting SASSy
bradp
4
290
#WCPVD - Getting SASSy
bradp
2
280
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
170
Other Decks in Technology
See All in Technology
プロポーザルに込める段取り八分
shoheimitani
1
180
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
使いにくいの壁を突破する
sansantech
PRO
1
130
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
570
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
220
Stately
mu7889yoon
1
110
Cosmos World Foundation Model Platform for Physical AI
takmin
0
630
顧客の言葉を、そのまま信じない勇気
yamatai1212
1
340
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
370
Azure Durable Functions で作った NL2SQL Agent の精度向上に取り組んだ話/jat08
thara0402
0
160
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
350
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
210
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
170
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
A Soul's Torment
seathinner
5
2.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
930
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Building Adaptive Systems
keathley
44
2.9k
Rails Girls Zürich Keynote
gr2m
96
14k
HDC tutorial
michielstock
1
370
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Typedesign – Prime Four
hannesfritz
42
2.9k
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