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
VeeValidate の"穴"を踏み抜いてしまった
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Takuya Eguchi (egch)
September 06, 2019
Technology
930
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VeeValidate の"穴"を踏み抜いてしまった
Takuya Eguchi (egch)
September 06, 2019
More Decks by Takuya Eguchi (egch)
See All by Takuya Eguchi (egch)
TypeScript の class を使い倒す
egch
1
59
Next.js に疲れた私は Vue3 に癒やされた
egch
0
340
Secure な UX のために Content Security Policy について知っておこう
egch
0
74
package.json がすごい
egch
0
150
Nuxt.js のインスタンスライフサイクル総点検
egch
0
420
Webエンジニアのデザイン実装との付き合い方
egch
0
330
20200528 - GCPでもサーバーレスでRubyりたい!
egch
0
140
継続的に楽しくプログラミングするには - 2018/11/3 Rails Girls Sendai
egch
0
120
Other Decks in Technology
See All in Technology
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
プロダクト価値を、 チームが使える判断軸に変える
vivion
0
140
SREでアラート疲れを 解決しよう!
kairim0
1
220
継続的なAIコスト最適化
bgpat
1
270
The seven pitfalls of AI (revised version)
ufried
0
300
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
0
190
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
240
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
890
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
320
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
340
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
130
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
330
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Statistics for Hackers
jakevdp
799
230k
Code Reviewing Like a Champion
maltzj
529
40k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Odyssey Design
rkendrick25
PRO
2
860
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Unsuck your backbone
ammeep
672
58k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Transcript
VeeValidate の”穴”を 踏み抜いてしまった 2019.9.6 v-sendai #3 @楽天株式会社 江口 拓弥
自己紹介 江口 拓弥 v-sendai 皆勤賞で LT やってる人です。 最近の構成は、 Nuxt.js x
TypeScript x Firebase x Auth0 です! 2 akathea_
おことわり このLTで登場するコードは、全て v2系の内容になります… 29 Jul. - VeeValidate 3.0 is out
!!! 3 akathea_
VeeValidateとは? akathea_
“ Template Based Validation Framework For Vue.js 5 akathea_
非同期かつリアルタイムに バリデーションできる 6 akathea_ https://codesandbox.io/s/x2k1l2y17o
ドキュメントも豊富 7 akathea_
i18nも楽ちん! 8 akathea_
こんな感じでバリデーション <input name="mail" :value="mail" placeholder="メールアドレス" validate="required|email" validate-name="メールアドレス" /> 9 akathea_
超便利! akathea_
ある日、痛ましい事件が… 11 メールマガジンが配 信できなかったユー ザー見てたら メアドに全角文字 入ってるんだけどこ れはバグ? ?! 運用チーム
私 akathea_
(そもそも)メールアドレスの 正しいフォーマットって? akathea_
RFC 5322 13 http://srgia.com/docs/rfc5322j.html#p3.4 akathea_
実はこんなメールアドレスがある 14 ◦ ...hoge…@docomo.ne.jp □ 先頭や@直前に「.」は使ってはいけない。「 .」を2回以上連続して使ってはいけない。いけな いのだが、docomoのキャリアメールでは許可されている。 ◦ “hoge
huga”@example.com □ 「“」と「”」に囲まれていた場合、間にスペースが利用できる。 できるが、そもそもダブルクオート使えるメールサービスを知らない。 ◦ 管理者@ぶいせんだい.jp , föö@bår.de □ RFC 6530 によって、メルアド(ユーザー名、ドメイン名どちらも )に マルチバイトが許可された。 Gmailも 2014年に送受信に対応。 とはいえ見たことはない。 akathea_
実はこんなメールアドレスがある 15 ...確かに存在する…! ...するが…! ...こんなアドレスがあるはずがない…! v.sendai3@gmail.co 全角 明らかに typo akathea_
入力値をどうチェックすべきだった? 16 ◦ メールアドレスのベリファイ※は実施していたが 利用時の必須条件にしていなかった ※会員登録されたアドレス宛にワンタイムURL付き確認メールを送信 ◦ 何度も会員登録できる仕組みではなかった →ユーザーは登録ミスに気づいても再登録できなかった →厳格なチェックが必要だった
◦ 「メールアドレスに使える文字は半角だけ」 という固定概念があった ◦ VeeValidateを始め、有名なライブラリなら そのへんも面倒見ていると勘違いしてしまった akathea_
まとめ akathea_
まとめ 18 ◦ 有名なライブラリ・フレームワークにも穴はある □ そもそも日本人以外は、今回の事象を 穴とも思っていないかもしれない ▪ i18n と
l11n は違う ◦ メールアドレスに限らず、世の中の常識が変わっているという 可能性を常に考慮する □ 常に最新の情報をキャッチアップし続ける ◦ 厳格なチェックが必要なときはちゃんとテストする ◦ 本当に穴っぽかったらPR出していこう! akathea_
ご清聴ありがとうございました 19