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
160
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
740
Extremely Powerful Local WordPress Development with Vagrant and Friends
bradp
1
190
Extremely Powerful Local WordPress Development with Vagrant and Friends - WordCamp Grand Rapids 2014
bradp
1
350
Web414 - Writing Clean, Clear, & Semantic Markup with HTML5
bradp
0
440
WordCamp Baltimore - Let's Get Sassy!
bradp
2
540
Starter Themes for Appleton WordPress Meetup
bradp
1
210
#WCGR - Getting SASSy
bradp
4
310
#WCPVD - Getting SASSy
bradp
2
320
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
190
Other Decks in Technology
See All in Technology
AI駆動開発をチームに根付かせる - 「1行も書かない」チームがHarnessを育てた1年 -
kenichirokimura
6
3.5k
AI駆動開発はどこまで来たのか? ファインディの最新実態調査で読み解く現在地 Devin Con Tokyo
akiratom
4
2.2k
いかに伝えるか 〜新卒エンジニアの教育のための、ライトノベル活用の一例
ikedon
1
130
どんな手を使っても絶対間に合わせるスケジューラ
asari194617
0
1.5k
[2026-08-25]AIによる自動化と人の介入、その狭間で揺れる信頼性についての俺の思いを、波よ聞いてくれ
tosite
0
110
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.2k
PdMをやめて、 "プロダクトビルダー"という 働き方に変えました / PdM to Product Builder
shikichee
2
560
Level Up Your CDK DX: 5 Tools I’ve Been Building
gotok365
2
150
AIレビュー時代に必要なのは、SLOで引く撤退ライン
nobuoooo
0
160
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
450
LLMアプリ、 雰囲気で運用してませんか? 〜LLMOpsの現在地〜
taka_aki
1
630
1.5時間を無駄にして学んだwsl2におけるaptとsnapの選択と仕組み
yosaka0123
0
480
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
310
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Side Projects
sachag
455
43k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
550
Marketing to machines
jonoalderson
1
5.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
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