SlideShare a Scribd company logo
1 of 48
Chapters 12, 13, 14
Ryne McCall
(a little) Security
Regular expressions
Unicode (maybe)
Security
Security
spectrum
more
secure
more
usable
Security ==
Laziness
OWASP top ten
• A1-Injection
• A2-Broken Authentication and Session Management
• A3-Cross-Site Scripting (XSS)
• A4-Insecure Direct Object References
• A5-Security Misconfiguration
• A6-Sensitive Data Exposure
• A7-Missing Function Level Access Control
• A8-Cross-Site Request Forgery (CSRF)
• A9-Using Components with Known Vulnerabilities
• A10-Unvalidated Redirects and Forwards
OWASP PHP
cheat sheet [link]
Regular expressions
Agenda
• What are they?
• Best practices
• Problems
History
–Larry Wall
“...we saw how everyone borrowed Perl
5 compatible regular expressions, and
we figured - well, you know, they're a
real big mess, and we're sorry, but
we're changing them now, now that
you've just borrowed them.”
What are they?
PCRE functions• preg_filter — Perform a regular expression search and replace
• preg_grep — Return array entries that match the pattern
• preg_last_error — Returns the error code of the last PCRE regex
execution
• preg_match_all — Perform a global regular expression match
• preg_match — Perform a regular expression match
• preg_quote — Quote regular expression characters
• preg_replace_callback — Perform a regular expression search and
replace using a callback
• preg_replace — Perform a regular expression search and replace
• preg_split — Split string by a regular expression
PCRE functions• preg_filter — Perform a regular expression search and replace
• preg_grep — Return array entries that match the pattern
• preg_last_error — Returns the error code of the last PCRE regex
execution
• preg_match_all — Perform a global regular expression match
• preg_match — Perform a regular expression match
• preg_quote — Quote regular expression characters
• preg_replace_callback — Perform a regular expression search and
replace using a callback
• preg_replace — Perform a regular expression search and replace
• preg_split — Split string by a regular expression
preg_match
int preg_match (
string $pattern ,
string $subject
[, array &$matches]
)
/………/
/………/
/app/
A. foo
B. bar
C. apple
D. app
/app/
A. foo
B. bar
C. apple
D. app
/a|b/
A. a
B. b
C. ab
D. x
/a|b/
A. a
B. b
C. ab
D. x
/a+/
A. a
B. aaa
C. baaab
D. b
/a+/
A. a
B. aaa
C. baaab
D. b
/a*/
A. a
B. aaa
C. baaab
D. b
/a*/
A. a
B. aaa
C. baaab
D. b
/^app$/
A. foo
B. bar
C. apple
D. app
/^app$/
A. foo
B. bar
C. apple
D. app
/^ab?c$/
A. aac
B. abc
C. ac
D. acc
/^ab?c$/
A. aac
B. abc
C. ac
D. acc
/^a.c$/
A. aac
B. abc
C. ac
D. acc
/^a.c$/
A. aac
B. abc
C. ac
D. acc
/^(?!(?:(?:x22?x5C[x00-
x7E]x22?)|(?:x22?[^x5Cx22]x22?)){255,})(?!(?:(?:x22?x5C[x00-
x7E]x22?)|(?:x22?[^x5Cx22]x22?)){65,}@)(?:(?:[x21x23-
x27x2Ax2Bx2Dx2F-x39x3Dx3Fx5E-x7E]+)|(?:x2 2(?:[x01-
x08x0Bx0Cx0E-x1Fx21x23-x5Bx5D-x7F]|(?:x5C[x00-
x7F]))*x22))(?:.(?:(?:[x21x23-x27x2Ax2Bx2Dx2F-x39x3Dx3Fx5E-
x7E]+)|(?:x22(?:[x01-x08x0Bx0Cx0E-x1Fx21x23-x5Bx5D-
x7F]|(?:x5C[x00- x7F]))*x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-
9]+(?:-+[a-z0-9]+)*.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-
9]+)*)|(?:[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-
9][:]]){7,})(?:[a-f0-9]{1,4}(?: :[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-
9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-
9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-
9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9 ])|(?:1[0-9]{2})|(?:[1-9]?[0-
9]))(?:.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))]))$/iD
/[[:alpha:]]/ or /[A-Za-z]/
A. a
B. b
C. c
D. -
/[[:alpha:]]/ or /[A-Za-z]/
A. a
B. b
C. c
D. -
/^[[:alpha:]]+d*$/
A. abc123
B. a
C. ~abc123~
D. 123abc
/^[[:alpha:]]+d*$/
A. abc123
B. a
C. ~abc123~
D. 123abc
/a{2,4}/
A. a
B. aa
C. aaaa
D. b
/a{2,4}/
A. a
B. aa
C. aaaa
D. b
/^([[:alpha:]]d)+[[:alpha:]]*$/
A. a0
B. a0xyz
C. 0a1b
D. a0b1xyz
/^([[:alpha:]]d)+[[:alpha:]]*$/
A. a0
B. a0xyz
C. 0a1b
D. a0b1xyz
/(d{3})-(d{3})-(d{4})/
Best practices
– Jamie Zawinski
“Some people, when
confronted with a problem,
think "I know, I'll use regular
expressions." Now they have
two problems.”
/good text/
A. good text; evil text
B. evil text good text
C. good text'; evil text
D. good text
/good text/
A. good text; evil text
B. evil text good text
C. good text'; evil text
D. good text
phone-number.php
Problems
Thanks

More Related Content

What's hot

Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Criticolegmmiller
 
RSpec and Rails
RSpec and RailsRSpec and Rails
RSpec and RailsAlan Hecht
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)James Titcumb
 
Writing SOLID code (in practice)
Writing SOLID code (in practice)Writing SOLID code (in practice)
Writing SOLID code (in practice)Tomasz Wójcik
 
Testing Ruby with Rspec (a beginner's guide)
Testing Ruby with Rspec (a beginner's guide)Testing Ruby with Rspec (a beginner's guide)
Testing Ruby with Rspec (a beginner's guide)Vysakh Sreenivasan
 

What's hot (7)

Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Critic
 
RSpec and Rails
RSpec and RailsRSpec and Rails
RSpec and Rails
 
Code smells in PHP
Code smells in PHPCode smells in PHP
Code smells in PHP
 
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
Kicking off with Zend Expressive and Doctrine ORM (ConFoo YVR 2017)
 
Writing SOLID code (in practice)
Writing SOLID code (in practice)Writing SOLID code (in practice)
Writing SOLID code (in practice)
 
Testing Ruby with Rspec (a beginner's guide)
Testing Ruby with Rspec (a beginner's guide)Testing Ruby with Rspec (a beginner's guide)
Testing Ruby with Rspec (a beginner's guide)
 
TDD with PhpSpec
TDD with PhpSpecTDD with PhpSpec
TDD with PhpSpec
 

Viewers also liked

Sistema electoral chilenopower3
Sistema electoral chilenopower3Sistema electoral chilenopower3
Sistema electoral chilenopower3Jorge Aguilera
 
Type-based Dependency Analysis
Type-based Dependency AnalysisType-based Dependency Analysis
Type-based Dependency AnalysisMatthias Keil
 
A Letter to my friend
A Letter to my friendA Letter to my friend
A Letter to my friendRajan Agrawal
 
Top 8 housekeeper supervisor resume samples
Top 8 housekeeper supervisor resume samplesTop 8 housekeeper supervisor resume samples
Top 8 housekeeper supervisor resume samplesparrijom
 
13. materi 4 mendesain media berbasis ict
13. materi 4 mendesain media berbasis ict13. materi 4 mendesain media berbasis ict
13. materi 4 mendesain media berbasis ictwidytia17
 
ESENCIALES PARA LA VIDA
ESENCIALES PARA LA VIDAESENCIALES PARA LA VIDA
ESENCIALES PARA LA VIDAsandra Rincon
 
Внешнеэкономические связи России
Внешнеэкономические связи РоссииВнешнеэкономические связи России
Внешнеэкономические связи Россииadam93
 
Gemeenten, Maak werk van vrijetijd!
Gemeenten, Maak werk van vrijetijd!Gemeenten, Maak werk van vrijetijd!
Gemeenten, Maak werk van vrijetijd!Roeland Tameling
 
Waiver Op Ed Providence Journal
Waiver Op Ed Providence JournalWaiver Op Ed Providence Journal
Waiver Op Ed Providence JournalMary E. Wambach
 
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...tapahtumaruoka
 
Relay For Life Kilkenny 2016
Relay For Life Kilkenny 2016Relay For Life Kilkenny 2016
Relay For Life Kilkenny 2016Joanne Brennan
 

Viewers also liked (16)

Sistema electoral chilenopower3
Sistema electoral chilenopower3Sistema electoral chilenopower3
Sistema electoral chilenopower3
 
Type-based Dependency Analysis
Type-based Dependency AnalysisType-based Dependency Analysis
Type-based Dependency Analysis
 
Santhosh Joseph - Business Strategy
Santhosh Joseph - Business StrategySanthosh Joseph - Business Strategy
Santhosh Joseph - Business Strategy
 
A Letter to my friend
A Letter to my friendA Letter to my friend
A Letter to my friend
 
Top 8 housekeeper supervisor resume samples
Top 8 housekeeper supervisor resume samplesTop 8 housekeeper supervisor resume samples
Top 8 housekeeper supervisor resume samples
 
13. materi 4 mendesain media berbasis ict
13. materi 4 mendesain media berbasis ict13. materi 4 mendesain media berbasis ict
13. materi 4 mendesain media berbasis ict
 
ESENCIALES PARA LA VIDA
ESENCIALES PARA LA VIDAESENCIALES PARA LA VIDA
ESENCIALES PARA LA VIDA
 
Внешнеэкономические связи России
Внешнеэкономические связи РоссииВнешнеэкономические связи России
Внешнеэкономические связи России
 
Gemeenten, Maak werk van vrijetijd!
Gemeenten, Maak werk van vrijetijd!Gemeenten, Maak werk van vrijetijd!
Gemeenten, Maak werk van vrijetijd!
 
Waiver Op Ed Providence Journal
Waiver Op Ed Providence JournalWaiver Op Ed Providence Journal
Waiver Op Ed Providence Journal
 
CATALOUGE
CATALOUGECATALOUGE
CATALOUGE
 
Psychological process
Psychological processPsychological process
Psychological process
 
my CV
my CVmy CV
my CV
 
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...
Asiakkaiden ja tapahtumajärjestäjien näkökulmia päijäthämäläisestä tapahtumar...
 
Spelling
SpellingSpelling
Spelling
 
Relay For Life Kilkenny 2016
Relay For Life Kilkenny 2016Relay For Life Kilkenny 2016
Relay For Life Kilkenny 2016
 

Similar to 200 Days of Code, Beginner Track, Month 5

Plunging Into Perl While Avoiding the Deep End (mostly)
Plunging Into Perl While Avoiding the Deep End (mostly)Plunging Into Perl While Avoiding the Deep End (mostly)
Plunging Into Perl While Avoiding the Deep End (mostly)Roy Zimmer
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freakskarupanerura
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...Amazon Web Services
 
You Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsYou Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsRoy Zimmer
 
Genomics Is Not Special: Towards Data Intensive Biology
Genomics Is Not Special: Towards Data Intensive BiologyGenomics Is Not Special: Towards Data Intensive Biology
Genomics Is Not Special: Towards Data Intensive BiologyUri Laserson
 
Bottom to Top Stack Optimization with LAMP
Bottom to Top Stack Optimization with LAMPBottom to Top Stack Optimization with LAMP
Bottom to Top Stack Optimization with LAMPkatzgrau
 
Bottom to Top Stack Optimization - CICON2011
Bottom to Top Stack Optimization - CICON2011Bottom to Top Stack Optimization - CICON2011
Bottom to Top Stack Optimization - CICON2011CodeIgniter Conference
 
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]Netconf for Peering Automation by Tom Paseka [APRICOT 2015]
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]APNIC
 
APRICOT 2015 - NetConf for Peering Automation
APRICOT 2015 - NetConf for Peering AutomationAPRICOT 2015 - NetConf for Peering Automation
APRICOT 2015 - NetConf for Peering AutomationTom Paseka
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)kwatch
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl TechniquesDave Cross
 
Juggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBDavid Golden
 
Php Site Optimization
Php Site OptimizationPhp Site Optimization
Php Site OptimizationAmit Kejriwal
 
Nibin - Reverse Engineering for exploit writers - ClubHack2008
Nibin - Reverse Engineering for exploit writers - ClubHack2008Nibin - Reverse Engineering for exploit writers - ClubHack2008
Nibin - Reverse Engineering for exploit writers - ClubHack2008ClubHack
 
Reverse Engineering for exploit writers
Reverse Engineering for exploit writersReverse Engineering for exploit writers
Reverse Engineering for exploit writersamiable_indian
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the futureAnsviaLab
 

Similar to 200 Days of Code, Beginner Track, Month 5 (20)

Plunging Into Perl While Avoiding the Deep End (mostly)
Plunging Into Perl While Avoiding the Deep End (mostly)Plunging Into Perl While Avoiding the Deep End (mostly)
Plunging Into Perl While Avoiding the Deep End (mostly)
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaks
 
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
(BDT402) Performance Profiling in Production: Analyzing Web Requests at Scale...
 
Php Intermediate
Php IntermediatePhp Intermediate
Php Intermediate
 
You Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager NeedsYou Can Do It! Start Using Perl to Handle Your Voyager Needs
You Can Do It! Start Using Perl to Handle Your Voyager Needs
 
Genomics Is Not Special: Towards Data Intensive Biology
Genomics Is Not Special: Towards Data Intensive BiologyGenomics Is Not Special: Towards Data Intensive Biology
Genomics Is Not Special: Towards Data Intensive Biology
 
Bottom to Top Stack Optimization with LAMP
Bottom to Top Stack Optimization with LAMPBottom to Top Stack Optimization with LAMP
Bottom to Top Stack Optimization with LAMP
 
Bottom to Top Stack Optimization - CICON2011
Bottom to Top Stack Optimization - CICON2011Bottom to Top Stack Optimization - CICON2011
Bottom to Top Stack Optimization - CICON2011
 
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]Netconf for Peering Automation by Tom Paseka [APRICOT 2015]
Netconf for Peering Automation by Tom Paseka [APRICOT 2015]
 
APRICOT 2015 - NetConf for Peering Automation
APRICOT 2015 - NetConf for Peering AutomationAPRICOT 2015 - NetConf for Peering Automation
APRICOT 2015 - NetConf for Peering Automation
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)
 
05php
05php05php
05php
 
Php classes in mumbai
Php classes in mumbaiPhp classes in mumbai
Php classes in mumbai
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl Techniques
 
Juggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDBJuggling Chainsaws: Perl and MongoDB
Juggling Chainsaws: Perl and MongoDB
 
Php Site Optimization
Php Site OptimizationPhp Site Optimization
Php Site Optimization
 
Nibin - Reverse Engineering for exploit writers - ClubHack2008
Nibin - Reverse Engineering for exploit writers - ClubHack2008Nibin - Reverse Engineering for exploit writers - ClubHack2008
Nibin - Reverse Engineering for exploit writers - ClubHack2008
 
Reverse Engineering for exploit writers
Reverse Engineering for exploit writersReverse Engineering for exploit writers
Reverse Engineering for exploit writers
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Scala : language of the future
Scala : language of the futureScala : language of the future
Scala : language of the future
 

Recently uploaded

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmDeepika Walanjkar
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 

Recently uploaded (20)

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 

200 Days of Code, Beginner Track, Month 5

Editor's Notes

  1. 12 - Cookies and Sessions 13 - Security Methods 14 - Perl-Compatible Regular Expressions
  2. DON'T want to bore you with a list of DON'Ts
  3. Make system as secure as possible for a given usability level. Ex. password complexity Otherwise, you’re leaving money on the table.
  4. Every forgot your keys? Or, done something else dumb? SQL injection: escape every time or use prepared statements Make security the obvious choice.
  5. Talks about: cookies sessions XSS and more
  6. Why do I want to talk about them? they are everywhere more interactive I think they are cool
  7. * Stephen Kleene * Ken Thompson * Henry Spencer * Larry Wall / Perl
  8. Declarative mini-language (like SQL) A way to specify well-understood patterns Comes in various dialects
  9. I don't always use a preg function, but when I do, I prefer preg_match
  10. Literal
  11. Literal
  12. Alternation
  13. Alternation
  14. Repetition
  15. Repetition
  16. More repetition
  17. More repetition
  18. Anchoring
  19. Anchoring
  20. 0 or 1 occurrences
  21. 0 or 1 occurrences
  22. Match any character (except newlines)
  23. Match anything (except newlines)
  24. Let's take a little break php-src:ext/filter/logical_filters.c:601 e-mail address filter
  25. character-classes.php
  26. character-classes.php
  27. Let's put it all together!
  28. Let's put it all together!
  29. Limited repetition
  30. Limited repetition
  31. Grouping
  32. Grouping
  33. matching.php mac-address.php
  34. Look for the good - its easier to specify
  35. Anchor
  36. Anchor
  37. NOTE: Slide not presented problem.php