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
350
WordCamp Baltimore - Let's Get Sassy!
bradp
2
370
Starter Themes for Appleton WordPress Meetup
bradp
1
130
#WCGR - Getting SASSy
bradp
4
240
#WCPVD - Getting SASSy
bradp
2
250
WordCamp Chicago 2013 - Template Hiearchy
bradp
1
140
Other Decks in Technology
See All in Technology
Beyond {shiny}: The Future of Mobile Apps with R
colinfay
1
380
似たような課題が何度も蘇ってくるゾンビふりかえりを撲滅するため、ふりかえりのテーマをフォーカスしてもらった話 / focusing on the theme
naitosatoshi
0
410
Cursor AgentによるパーソナルAIアシスタント育成入門―業務のプロンプト化・MCPの活用
os1ma
12
3.8k
アジャイル脅威モデリング#1(脅威モデリングナイト#8)
masakane55
3
170
Amazon S3 Tables + Amazon Athena / Apache Iceberg
okaru
0
260
AIエージェント開発における「攻めの品質改善」と「守りの品質保証」 / 2024.04.09 GPU UNITE 新年会 2025
smiyawaki0820
0
420
DETR手法の変遷と最新動向(CVPR2025)
tenten0727
2
1.2k
Porting PicoRuby to Another Microcontroller: ESP32
yuuu
3
230
IVRyにおけるNLP活用と NLP2025の関連論文紹介
keisukeosone
0
180
AIで進化するソフトウェアテスト:mablの最新生成AI機能でQAを加速!
mfunaki
0
120
LangfuseでAIエージェントの 可観測性を高めよう!/Enhancing AI Agent Observability with Langfuse!
jnymyk
0
180
AWS全冠芸人が見た世界 ~資格取得より大切なこと~
masakiokuda
4
3.4k
Featured
See All Featured
Designing for humans not robots
tammielis
252
25k
Visualization
eitanlees
146
16k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
520
GraphQLとの向き合い方2022年版
quramy
46
14k
Unsuck your backbone
ammeep
670
57k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
104
19k
The Language of Interfaces
destraynor
157
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
178
53k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
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