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
78
徳丸本 ログインフォーム
mcz9mm
0
97
arkit+animoji
mcz9mm
0
63
徳丸本8
mcz9mm
0
110
Featured
See All Featured
RailsConf 2023
tenderlove
29
880
How to Ace a Technical Interview
jacobian
275
23k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
Rails Girls Zürich Keynote
gr2m
93
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Making Projects Easy
brettharned
115
5.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
KATA
mclloyd
29
13k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Building an army of robots
kneath
302
42k
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+$/);ɹɹ //֯ӳࣈͷΈ ͳͲͳͲɾɾ