SlideShare a Scribd company logo
Tightly binding your model(Part of a series on ASP.NET MVC Security) Barry Dorrans MVP – Developer Security
Introduction The ModelA class that encapsulates data and represents a business entity, for example an Order. The ViewThe user interface into an application.  The ControllerManages communication between the UI and the model.
Binding Binding takes input from a view and applies it to a model. For example A view contains a field called “PostCode” The model has a public get/set property called “PostCode” Binding uses the PostCode property on the model to render onto the view and takes the returned PostCode input value and sets the property on the Model.
The Problem What if I add a field during form submission that has a property name matching that of the model? ....
The Solution - FormDataCollection If your actions take FromDataCollections pass a string array of allowed bindable property names e.g.UpdateModel(boardPost,   new[]{"Title","Content","Rating"});
The Solution – Model Actions If your actions take an instance of a model object then set the bind attribute in your method definition e.g.[AcceptVerbs(HttpVerbs.Post)]public ActionResult Edit(  [Bind(Include = "Title,Content")]BoardPostboardPost)
The Solution – Model Based You can also apply the Bind attribute to your model classes – but this applies to all binding calls, which can be limiting.[Bind(Include="Title,Content")]public class BoardPosting{}
The Solution – General Create a view specific model which has protected properties which are not bindable. Or be really nasty and create a custom binder. Propeller hats needed.  You can also exclude rather than include – white listing is more secureExcludes may be suitable for model level restrictions.

More Related Content

What's hot

Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
Bhagath Gopinath
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
Android Data Binding Support Library
Android Data Binding Support LibraryAndroid Data Binding Support Library
Android Data Binding Support Library
ersin ertan
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
Prem Sanil
 
Using mvvm inside mvc in domain driven design
Using mvvm inside mvc in domain driven designUsing mvvm inside mvc in domain driven design
Using mvvm inside mvc in domain driven design
yashar Aliabasi
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
Dominique Cimafranca
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
ravindraquicsolv
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
Naga Harish M
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity Framework
Shravan A
 
ASP.NET MVC4 Overview
ASP.NET MVC4 OverviewASP.NET MVC4 Overview
ASP.NET MVC4 Overview
Mahmoud Tolba
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
Ni
 
MVVM
MVVMMVVM
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
SaBin SaleEm
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
Nyros Technologies
 
MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 framework
imarkovic
 

What's hot (20)

Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
MVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros DeveloperMVC Architecture in ASP.Net By Nyros Developer
MVC Architecture in ASP.Net By Nyros Developer
 
Android Data Binding Support Library
Android Data Binding Support LibraryAndroid Data Binding Support Library
Android Data Binding Support Library
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Using mvvm inside mvc in domain driven design
Using mvvm inside mvc in domain driven designUsing mvvm inside mvc in domain driven design
Using mvvm inside mvc in domain driven design
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
MVC architecture
MVC architectureMVC architecture
MVC architecture
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
MVC Framework
MVC FrameworkMVC Framework
MVC Framework
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity Framework
 
ASP.NET MVC4 Overview
ASP.NET MVC4 OverviewASP.NET MVC4 Overview
ASP.NET MVC4 Overview
 
ASP.NET MVC.
ASP.NET MVC.ASP.NET MVC.
ASP.NET MVC.
 
ASP.NET MVC 4 Introduction
ASP.NET MVC 4 IntroductionASP.NET MVC 4 Introduction
ASP.NET MVC 4 Introduction
 
MVVM
MVVMMVVM
MVVM
 
ASP.Net | Sabin Saleem
ASP.Net | Sabin SaleemASP.Net | Sabin Saleem
ASP.Net | Sabin Saleem
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 
MVC4 framework
MVC4 frameworkMVC4 framework
MVC4 framework
 

Viewers also liked

Slideshow My Prato
Slideshow My PratoSlideshow My Prato
Slideshow My Prato
guest8bf0c5c
 
Text Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данныхText Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данных
Alexey Kononenko
 
Prioritizing For Profit at Agile 08
Prioritizing For Profit at Agile 08Prioritizing For Profit at Agile 08
Prioritizing For Profit at Agile 08Enthiosys Inc
 
Codename Astm1
Codename Astm1Codename Astm1
Codename Astm1ASTM1
 
九方中文輸入法 輸入整體字
九方中文輸入法 輸入整體字九方中文輸入法 輸入整體字
九方中文輸入法 輸入整體字Warren Yip
 
Updated Fair Student Funding Houston Presentation Final
Updated   Fair Student Funding Houston Presentation FinalUpdated   Fair Student Funding Houston Presentation Final
Updated Fair Student Funding Houston Presentation Finalbiferguson
 
How to setup the printing preferences
How to setup the printing preferencesHow to setup the printing preferences
How to setup the printing preferencesWarren Yip
 
防止中毒:電郵篇
防止中毒:電郵篇防止中毒:電郵篇
防止中毒:電郵篇Warren Yip
 
Cities: WordCamp Montreal 2013
Cities: WordCamp Montreal 2013Cities: WordCamp Montreal 2013
Roadmap to WordPress Accessibility CSUN 2014
Roadmap to WordPress Accessibility CSUN 2014Roadmap to WordPress Accessibility CSUN 2014
Roadmap to WordPress Accessibility CSUN 2014
Los Angeles Accessibility and Inclusive Design Group
 
Ferguson - Legislator's Report Card
Ferguson - Legislator's Report CardFerguson - Legislator's Report Card
Ferguson - Legislator's Report Cardbiferguson
 
Bulding a social enterprise
Bulding a social enterpriseBulding a social enterprise
Bulding a social enterprisewww.panorama.com
 
Presentación Programa Superior de #ContactCenter
Presentación Programa Superior de #ContactCenterPresentación Programa Superior de #ContactCenter
Presentación Programa Superior de #ContactCenter
Raquel1704
 
Complete Business Intelligence Solution for Your Microsoft Platform
Complete Business Intelligence Solution for Your Microsoft PlatformComplete Business Intelligence Solution for Your Microsoft Platform
Complete Business Intelligence Solution for Your Microsoft Platform
www.panorama.com
 
2010洛杉矶自助旅游攻略路书
2010洛杉矶自助旅游攻略路书2010洛杉矶自助旅游攻略路书
2010洛杉矶自助旅游攻略路书koala009
 
Elmeedan Network Presentation
Elmeedan Network PresentationElmeedan Network Presentation
Elmeedan Network Presentation
Bayan Waleed Shadaideh
 
Presentacion I Cities 2009
Presentacion I Cities 2009Presentacion I Cities 2009
Presentacion I Cities 2009
Fernando Martin
 
Final State Of Schools Presentation 081208
Final State Of Schools Presentation 081208Final State Of Schools Presentation 081208
Final State Of Schools Presentation 081208biferguson
 

Viewers also liked (20)

Slideshow My Prato
Slideshow My PratoSlideshow My Prato
Slideshow My Prato
 
Klimatkontoret i Örebro
Klimatkontoret i ÖrebroKlimatkontoret i Örebro
Klimatkontoret i Örebro
 
Text Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данныхText Analytics -- анализ неструктурированных данных
Text Analytics -- анализ неструктурированных данных
 
Prioritizing For Profit at Agile 08
Prioritizing For Profit at Agile 08Prioritizing For Profit at Agile 08
Prioritizing For Profit at Agile 08
 
Codename Astm1
Codename Astm1Codename Astm1
Codename Astm1
 
九方中文輸入法 輸入整體字
九方中文輸入法 輸入整體字九方中文輸入法 輸入整體字
九方中文輸入法 輸入整體字
 
Updated Fair Student Funding Houston Presentation Final
Updated   Fair Student Funding Houston Presentation FinalUpdated   Fair Student Funding Houston Presentation Final
Updated Fair Student Funding Houston Presentation Final
 
Sr sastav znachenie
Sr sastav znachenieSr sastav znachenie
Sr sastav znachenie
 
How to setup the printing preferences
How to setup the printing preferencesHow to setup the printing preferences
How to setup the printing preferences
 
防止中毒:電郵篇
防止中毒:電郵篇防止中毒:電郵篇
防止中毒:電郵篇
 
Cities: WordCamp Montreal 2013
Cities: WordCamp Montreal 2013Cities: WordCamp Montreal 2013
Cities: WordCamp Montreal 2013
 
Roadmap to WordPress Accessibility CSUN 2014
Roadmap to WordPress Accessibility CSUN 2014Roadmap to WordPress Accessibility CSUN 2014
Roadmap to WordPress Accessibility CSUN 2014
 
Ferguson - Legislator's Report Card
Ferguson - Legislator's Report CardFerguson - Legislator's Report Card
Ferguson - Legislator's Report Card
 
Bulding a social enterprise
Bulding a social enterpriseBulding a social enterprise
Bulding a social enterprise
 
Presentación Programa Superior de #ContactCenter
Presentación Programa Superior de #ContactCenterPresentación Programa Superior de #ContactCenter
Presentación Programa Superior de #ContactCenter
 
Complete Business Intelligence Solution for Your Microsoft Platform
Complete Business Intelligence Solution for Your Microsoft PlatformComplete Business Intelligence Solution for Your Microsoft Platform
Complete Business Intelligence Solution for Your Microsoft Platform
 
2010洛杉矶自助旅游攻略路书
2010洛杉矶自助旅游攻略路书2010洛杉矶自助旅游攻略路书
2010洛杉矶自助旅游攻略路书
 
Elmeedan Network Presentation
Elmeedan Network PresentationElmeedan Network Presentation
Elmeedan Network Presentation
 
Presentacion I Cities 2009
Presentacion I Cities 2009Presentacion I Cities 2009
Presentacion I Cities 2009
 
Final State Of Schools Presentation 081208
Final State Of Schools Presentation 081208Final State Of Schools Presentation 081208
Final State Of Schools Presentation 081208
 

Similar to Model Binding in ASP.NET MVC

Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Sony Suci
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
Ravi Bhadauria
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
Pankhuree Srivastava
 
Learning .NET Attributes
Learning .NET AttributesLearning .NET Attributes
Learning .NET Attributes
Pooja Gaikwad
 
Learn dot net attributes
Learn dot net attributesLearn dot net attributes
Learn dot net attributes
sonia merchant
 
An Overview of Entity Framework
An Overview of Entity FrameworkAn Overview of Entity Framework
An Overview of Entity Framework
iFour Technolab Pvt. Ltd.
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senja
alifha12
 
Learning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkLearning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkAkhil Mittal
 
Angular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advancedAngular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advanced
Preetha Ganapathi
 
Cloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in PuneCloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in Pune
MindScripts SoftwareTestingPune
 
Salesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScriptsSalesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScripts
MindScripts SoftwareTestingPune
 
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTSPune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
MindScripts SoftwareTestingPune
 
Learn about dot net attributes
Learn about dot net attributesLearn about dot net attributes
Learn about dot net attributes
sonia merchant
 
Knockoutjs databinding
Knockoutjs databindingKnockoutjs databinding
Knockoutjs databinding
Boulos Dib
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
MindScripts SoftwareTestingPune
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
MindScripts SoftwareTestingPune
 
Cloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri ChinchwadCloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri Chinchwad
MindScripts SoftwareTestingPune
 
Salesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScriptsSalesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScripts
MindScripts SoftwareTestingPune
 

Similar to Model Binding in ASP.NET MVC (20)

Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) kerenTutorial mvc (pelajari ini jika ingin tahu mvc) keren
Tutorial mvc (pelajari ini jika ingin tahu mvc) keren
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
 
Mvc acchitecture
Mvc acchitectureMvc acchitecture
Mvc acchitecture
 
Software Design Patterns
Software Design PatternsSoftware Design Patterns
Software Design Patterns
 
Learning .NET Attributes
Learning .NET AttributesLearning .NET Attributes
Learning .NET Attributes
 
Learn dot net attributes
Learn dot net attributesLearn dot net attributes
Learn dot net attributes
 
An Overview of Entity Framework
An Overview of Entity FrameworkAn Overview of Entity Framework
An Overview of Entity Framework
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senja
 
Learning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkLearning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFramework
 
ASP.NET MVC3 RAD
ASP.NET MVC3 RADASP.NET MVC3 RAD
ASP.NET MVC3 RAD
 
Angular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advancedAngular Framework ppt for beginners and advanced
Angular Framework ppt for beginners and advanced
 
Cloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in PuneCloud Computing Certification Courses in Pune
Cloud Computing Certification Courses in Pune
 
Salesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScriptsSalesforce Training Institutes in Pune MindScripts
Salesforce Training Institutes in Pune MindScripts
 
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTSPune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
Pune PradhiKaran Nigdi - CLOUD COMPUTING CLASSES @ MINDSCRIPTS
 
Learn about dot net attributes
Learn about dot net attributesLearn about dot net attributes
Learn about dot net attributes
 
Knockoutjs databinding
Knockoutjs databindingKnockoutjs databinding
Knockoutjs databinding
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
 
Cloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScriptsCloud computing Training Institutes in Pune : MindScripts
Cloud computing Training Institutes in Pune : MindScripts
 
Cloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri ChinchwadCloud Computing Certification In Pimpri Chinchwad
Cloud Computing Certification In Pimpri Chinchwad
 
Salesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScriptsSalesforce Courses in Pune MindScripts
Salesforce Courses in Pune MindScripts
 

Recently uploaded

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

Model Binding in ASP.NET MVC

  • 1. Tightly binding your model(Part of a series on ASP.NET MVC Security) Barry Dorrans MVP – Developer Security
  • 2. Introduction The ModelA class that encapsulates data and represents a business entity, for example an Order. The ViewThe user interface into an application. The ControllerManages communication between the UI and the model.
  • 3. Binding Binding takes input from a view and applies it to a model. For example A view contains a field called “PostCode” The model has a public get/set property called “PostCode” Binding uses the PostCode property on the model to render onto the view and takes the returned PostCode input value and sets the property on the Model.
  • 4. The Problem What if I add a field during form submission that has a property name matching that of the model? ....
  • 5. The Solution - FormDataCollection If your actions take FromDataCollections pass a string array of allowed bindable property names e.g.UpdateModel(boardPost, new[]{"Title","Content","Rating"});
  • 6. The Solution – Model Actions If your actions take an instance of a model object then set the bind attribute in your method definition e.g.[AcceptVerbs(HttpVerbs.Post)]public ActionResult Edit( [Bind(Include = "Title,Content")]BoardPostboardPost)
  • 7. The Solution – Model Based You can also apply the Bind attribute to your model classes – but this applies to all binding calls, which can be limiting.[Bind(Include="Title,Content")]public class BoardPosting{}
  • 8. The Solution – General Create a view specific model which has protected properties which are not bindable. Or be really nasty and create a custom binder. Propeller hats needed. You can also exclude rather than include – white listing is more secureExcludes may be suitable for model level restrictions.