Vulnerability in EPiServer.Forms
I would like to get all the available page types in episerver that are a Page Data. For that I'm doing:
var contentTypeRepository = ServiceLocator.Current.GetInstance();
var pageTypeList = contentTypeRepository.List().OfType();
The problem is when I try to check if a page is at PageData this doesn't work. The idea is to filter all those pages that are in the pageTypeList.
How I can do that?
You could filter in ContentType.ModelType, like:
var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var pageTypeList = contentTypeRepository.List().Where(c => typeof(PageData).IsAssignableFrom(c.ModelType));