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
徳丸本輪読会
Search
mcz9mm
July 20, 2017
0
150
徳丸本輪読会
4.1
4.2
mcz9mm
July 20, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
2.1k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1k
ゆるく学ぶARKit
mcz9mm
3
1.4k
What’s TCP/UDP?
mcz9mm
0
98
NATサーバーの必要性
mcz9mm
0
84
What’s New in ARKit2.0
mcz9mm
0
80
徳丸本 ログインフォーム
mcz9mm
0
97
arkit+animoji
mcz9mm
0
64
徳丸本8
mcz9mm
0
110
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
43
13k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Faster Mobile Websites
deanohume
305
30k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Docker and Python
trallard
40
3.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Building Your Own Lightsaber
phodgson
103
6.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Site-Speed That Sticks
csswizardry
0
26
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Transcript
ಙؙຊྠಡձ 4.1 WebΞϓϦέʔγϣϯͷػೳͱ੬ऑੑͷ ରԠ
੬ऑੑͷൃੜͱ໊শ • HTMLͷग़ྗ(ΫϩεαΠτεΫϦϓςΟϯά) • HTTPϔομͷग़ྗ(HTTPϔομΠϯδΣΫγϣϯ) • SQLͷݺͼग़͠(SQLΠϯδΣΫγϣϯ) • γΣϧίϚϯυͷݺͼग़͠(OSίϚϯυΠϯδΣΫγϣϯ) •
ϝʔϧϔομٴͼຊจͷग़ྗ(ϝʔϧϔομΠϯδΣΫγϣϯ)
ΠϯδΣΫγϣϯܥ੬ऑੑͱ • webΞϓϦέʔγϣϯͷ΄ͱΜͲ͕ςΩετ ܗࣜͷΠϯλʔϑΣʔεΛ༻͍ͯ͠Δ
͜ΕΒͷςΩετɺܾΊΒΕͨจ๏ɾϧʔϧͳͲʹ ΑΓɺͦͷதʹ໋ྩԋࢉɺσʔλ͕ೖ͍ͬͯΔ SELECT * FROM idol WHERE id = ‘$id'
͜ͷ$idʹςΩετͱͯ͠ɺҎԼͷจষΛ༩͑ͯΈΔ ';DELETE FROM users;'
֎෦͔Βྲྀ͠ࠐ·ΕͨςΩετ໋ྩͱͯ͠ଊ͑ΒΕ ͯ͠·͏ SELECT * FROM idol WHERE id = ';DELETE
FROM users;'
ಙؙຊྠಡձ 4.2 ೖྗॲཧͱηΩϡϦςΟ
webΞϓϦέʔγϣϯͰͷೖྗͰԿΛ͢Δ͔ • จࣈΤϯίʔσΟϯάͷଥੑݕূ • จࣈΤϯίʔσΟϯάͷม • ύϥϝʔλจࣈྻͷଥੑݕূ
PHPΛྫʹ͢Δͱɺೖྗ͞Εͨจࣈ͕ෆਖ਼ͳจࣈΤϯίʔσΟϯ άͰͳ͍͔ม͢Δ͜ͱ͕Ͱ͖Δɻ ͨͩɺෆਖ਼ͳσʔλআ͞ΕΔ͔ผͷจࣈʹஔ͖ΘΔͷͰɺ ݁Ռͱͯ͠߈ܸ͛Δ͕ɺ จࣈ͕Խ͚ͨ··ར༻ऀ͕ؾ͕͔ͭͣʹॲཧΛܧଓΛͯ͠͠·ͬ ͨΓ͢Δ
ೖྗͷݕূ • ೖྗͷؒҧ͍Λૣظʹൃݟͯ͠࠶ೖྗΛଅͨ͠Γɺ ϢʔβʔϏϦςΟΛ্͢Δ͜ͱ͕Ͱ͖Δ • σʔλͷෆ߹Λ͗ɺγεςϜͷ৴པੑΛ্͞ ͤΔ
όΠφϦηʔϑͱψϧόΠτ • ςΩετܗࣜʢจࣈσʔλʣҎ֎ͷσʔλܗ ࣜશൠͷ͜ͱɻόΠφϦܗࣜͷσʔλΛόΠ φϦσʔλͱ͍͏
όΠφϦηʔϑͱψϧόΠτ • ψϧόΠτ߈ܸͱɺԿΒ͔ͷϦΫΤετ͞Εͨ จࣈྻʹ%00(ψϧόΠτ)ΛؚΊΔ͜ͱͰɺWeb ΞϓϦέʔγϣϯଆͷηΩϡϦςΟʔνΣοΫΛ ͙͘Γൈ͚Δ߈ܸ • PHPࣗମCݴޠͰॻ͔Ε͍ͯΔΒ͘͠ɺPHPͱC ͷψϧόΠτʹର͢Δѻ͍͕ҧ͏ؔͷʮͶ͡Εʯ Λར༻ͨ͠߈ܸ
• ೖྗ͞ΕͨೖΓޱͰόΠφϦηʔϑͷؔΛ ༻͍ͯνΣοΫ͢Δ
όΠφϦηʔϑͱψϧόΠτ • ψϧόΠτ߈ܸͱɺԿΒ͔ͷϦΫΤετ͞Εͨ จࣈྻʹ%00(ψϧόΠτ)ΛؚΊΔ͜ͱͰɺWeb ΞϓϦέʔγϣϯଆͷηΩϡϦςΟʔνΣοΫΛ ͙͘Γൈ͚Δ߈ܸ • PHPࣗମCݴޠͰॻ͔Ε͍ͯΔΒ͘͠ɺPHPͱC ͷψϧόΠτʹର͢Δѻ͍͕ҧ͏ؔͷʮͶ͡Εʯ Λར༻ͨ͠߈ܸ
จࣈࣗମͷνΣοΫෆՄܽ • ʮͯ͢ͷจࣈΛڐՄʯ͢Δ͜ͱࣗମϦεΫ • จࣈνΣοΫ੍ޚจࣈͷνΣοΫ
ਖ਼نදݱͰݕূ͢Δ • value.match(/[a-zA-Z]/); //ӳࣈͷΈ • value.match(/^\d+$/);ɹɹ //֯ӳࣈͷΈ ͳͲͳͲɾɾ