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
リダイレクト
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ruuuui
August 08, 2017
44
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
リダイレクト
ruuuui
August 08, 2017
More Decks by ruuuui
See All by ruuuui
TCP/IP
ruuuui
0
63
log
ruuuui
0
62
Malware
ruuuui
0
45
It’s been a while.
ruuuui
0
35
File
ruuuui
0
54
a
ruuuui
0
53
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
Documentation Writing (for coders)
carmenintech
77
5.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Agile that works and the tools we love
rasmusluckow
331
22k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
My Coaching Mixtape
mlcsv
0
360
エンジニアに許された特別な時間の終わり
watany
109
250k
Transcript
ϦμΠϨΫτॲཧʹ·ͭΘΔ੬ऑੑ Rui Arai
ϦμΠϨΫτͱɻ
ϦμΠϨΫτͱɻ • ಛఆͷϖʔδ͔Βผͷϖʔδʹసૹ͢Δ͜ͱ
ࠓճͷઅͰ ΦʔϓϯϦμΠϨΫλ੬ऑੑ HTTPϔομɾΠϯδΣΫγϣϯ
ΦʔϓϯϦμΠϨΫλ੬ऑੑʹ͍ͭͯ
ΦʔϓϯϦμΠϨΫλ੬ऑੑͱ • ҙͷυϝΠϯʹϦμΠϨΫτͰ͖ΔͷΛΦʔ ϓϯϦμΠϨΫλͱݺͼɺͦͷ੬ऑੑΛࢦ͢
ΦʔϓϯϦμΠϨΫλ੬ऑੑͱ • ྫ https://example.jp/login.php?url=http://trap.example./com ্هͷURLʹΑΓةݥͳαΠτ༠ಋ͞ΕΔ ϒϩάϝʔϧͰӾཡ͢ΔΑ͏ʹ͚·͢
੬ऑੑ͕ੜ·ΕΔݪҼ ϦμΠϨΫτઌͷURLΛ֎෦͔ΒࢦఆͰ͖Δ ϦμΠϨΫτઌͷυϝΠϯνΣοΫ͕ͳ͍
ରࡦ • ϦμΠϨΫτઌͷURLΛݻఆʹ͢Δɻ ɹˠݻఆͷURLʹ͢Δ • ϦμΠϨΫτઌͷURLΛࢦఆͤͣ൪߸ࢦఆʹ͢Δɻ ɹˠϖʔδ൪߸Λࢦఆ͠ɺURLඈ͢ • ϦμΠϨΫτઌͷυϝΠϯΛνΣοΫ͢Δɻ ɹˠ࣍
• ΫογϣϯϖʔδΛ͚Δ
ϦμΠϨΫτઌͷυϝΠϯνΣοΫ • ·͍͠ॻ͖ํ if (mb_ereg('\Ahttps?://example\.jp/[-_.!~*\'();\/?:@&=+\$,$#a-zA-Z0-9]*\z', $url)) { // νΣοΫOK }
• "http://example.jp/" ·ͨ "https://example.jp/" Ͱ࢝·Δ͜ͱ • จࣈྻͷઌ಄ɾඌΛࣔ͢ه߸ͱͯ͠ "\A" ͱ "\z" Λ༻ • "https?" httpͱhttpsͷ྆ํʹରԠ͢Δ
HTTPϔομɾΠϯδΣΫγϣϯ
HTTPϔομͷछྨ • Ϩεϙϯεϔομ • ϦΫΤετϔομ
Ϩεϙϯεϔομ ϑΟʔϧυ໊ ༰ Server Σϒαʔόͷ໊લͱόʔδϣϯใɻ Date ݱࡏͷʢάϦχοδඪ४࣌ʣ Last-Modified Ϧιʔεͷߋ৽ Content-Length
ग़ྗͷόΠτ୯Ґͷ͞ όΠφϦσʔλؚΈ·͢ɻ Content-Type ग़ྗͷMIMEλΠϓ Expires Ϧιʔεͷ༗ޮظݶ ͜ͷҎ߱ແޮͰ͢ɻΩϟογϡഁ Location ϦμΠϨΫτ URL ใ Location Ͱࢦఆ͞ΕͨϦιʔε͕ૹ৴͞Ε· Pragma ϦιʔεͷΩϟογϯάΛ༗ޮ/ແޮʹ͢ Δ Status ϦΫΤετͷεςʔλε ୯ಠϔομͱͯ͠ग़ྗ͞Ε·͢ɻ WWW-Authenticate ೝূσʔλɻ ೝূʹඞཁͳϢʔβʔ໊ύεϫʔυͳͲ Refresh ࢦఆ͞ΕͨυΩϡϝϯτΛ࠶ϩʔυ͢ Δɻ Set-Cookie σʔλΛΫϥΠΞϯτଆʹอଘ͢Δɻ Etag αʔόʔݻ༗ͷใ͕༩͞Εɺϒϥβ ΩϟογϡΛ࠶ར༻͢Δ͔Ͳ͏͔அͤ͞
HTTPϔομΠϯδΣΫγϣϯͱ <?php header('Location: ' . $_GET['url']); ͜ΕʹΑΓੜ͞ΕΔHTTPϨεϙϯεϔομҎԼͱͳΓ·͢ɻ Location: http://example/top.php Set-Cookie:
PHPSESSID=ABC http://example.jp/header.php?url=http://example/top.php%0d%0aSet-Cookie:+PHPSESSID%3DABC ։ൃऀͷҙਤ͠ͳ͍Ϩεϙϯε͕ग़ྗ͞ΕΔ ྫʣηογϣϯݻఆ߈ܸͳͲ
੬ऑੑ͕ੜ·ΕΔݪҼ • URLCookieʹվߦؚ͕·Εͯ͠·͏͜ͱͰɺى͜Δ੬ऑੑ
ରࡦ • ֎෦͔ΒͷύϥϝʔλΛϨεϙϯεϔομͱͯ͠ग़ྗ͠ͳ͍ • ҎԼͷ2ͭΛ࣮ࢪ͢Δ >ϦμΠϨΫτΫοΩʔੜઐ༻APIʹͤΔ >ϔομੜ͢ΔύϥϝʔλͷվߦΛνΣοΫ ɹྫʣվߦίʔυΤϥʔʹ͢Δ
݁ • ϦμΠϨΫτॲཧʹɺͰ͖Δ͚ͩઐ༻ͷAPIΛ͏ • ϦμΠϨΫτઌݻఆ͢Δ • ֎෦͔Βࢦఆ͢ΔϦμΠϨΫτඞͣɺจࣈछͱυϝΠϯ໊ΛνΣοΫ͢Δ