Commit Graph

2918 Commits

Author SHA1 Message Date
Pranav K 0c93a5e093 Update versions to 1.0.2 2016-11-03 10:37:18 -07:00
Ryan Brandenburg f02f55c33d Antiforgery goes at the end of filters 2016-11-02 16:45:04 -07:00
jacalvar 998a47d265 [Fixes #4960] Action results returned from controller actions rendered as json instead of executed 2016-11-01 11:17:58 -07:00
N. Taylor Mullen edb5baf81c Change SHA256 algorithm to work on FIPS-compliant machines.
#5103
2016-08-17 14:25:22 -07:00
N. Taylor Mullen 6e5fd4f89f Up Antiforgery to 1.0.1 for FIPS compliance changes. 2016-08-17 14:25:19 -07:00
Pranav K 4ca44f01cf Merge remote-tracking branch 'origin/master' into rel/1.0.1 2016-08-12 10:37:52 -07:00
Pranav K 37ee065c08 Updating to dotnet.myget.org 2016-08-12 10:15:35 -07:00
jacalvar f0732e9e21 [Fixes #5038] HTTP Verbs mapping error GET and DELETE
When an action contained an attribute derived from HttpMethodAttribute,
doesn't specify an attribute route and there is also another attribute
extending HttpMethodAttribute that has a route defined on it; we ignored
the HttpMethodAttribute attribute without a defined route when building
the set of action selectors for the method.

This caused the resulting action to be unbounded and to accept requests
for other verbs not associated with it. The root cause of the problem was
that attributes override equality and do a field by field comparison but
ignore fields in the base classes of the type, so if an attribute is part
of a class hierarchy (like Http*Attributes) there might be two different
attributes that get considered equal.

The fix for the problem has been to change using Contains on a couple of
collections (that uses the equals method on the underlying object) and
check for the existence of the attribute on the collection directly by
using reference equality.
2016-08-01 12:49:23 -07:00
Pranav K 5092e75387 Pin repo version to 1.0.1 2016-07-26 12:09:57 -07:00
Ryan Nowak 85ca3e4976 Fix #4998 - Change lifetime of ViewComponentResultExecutor
This service has a scoped dependency so it should be scoped or transient.
2016-07-21 10:23:36 -07:00
Ryan Nowak fb514d7ef8 Update versions to 1.0.1-*
Also adding a version number to TestConfiguration. This is not a leaf node
so it should have a version.
2016-07-21 09:55:28 -07:00
Pranav K 6bdcf35670 Pin the version of dotnet-test-xunit to 1.0.0-rc3-00000-01 2016-07-19 11:14:56 -07:00
Pranav K a1f4786695 Updating json files to pin versions and build files to pin KoreBuild 2016-06-27 13:51:10 -07:00
Pranav K 661677dca1 Updating NuGet.config 2016-06-27 13:50:15 -07:00
jacalvar 70af8cf79e Update Json.NET to 9.0.1 2016-06-15 15:11:56 -07:00
Pranav K cd33c4e908 Updating to release. 2016-06-14 16:23:18 -07:00
N. Taylor Mullen 8499e3d6bb Remove direct Microsoft.NETCore.Platforms dependency.
- Microsoft.NETCore.App now pulls this package in.

aspnet/Coherence-Signed#344
2016-06-13 15:30:27 -07:00
N. Taylor Mullen 0501531ec4 React to namespace changes in Razor.
aspnet/Razor#779
2016-06-13 11:22:56 -07:00
Doug Bunting 68974b2d1f Add tests covering more JSON serialization cases
- #4844
2016-06-10 15:25:53 -07:00
Doug Bunting b5a6303bb6 Address more PR comments 2016-06-10 14:49:49 -07:00
Doug Bunting 3a6541af10 Address PR comments 2016-06-10 14:26:14 -07:00
Doug Bunting 1f6bbf9967 Add doc comments for `public` attributes
- #4641
2016-06-10 14:26:14 -07:00
Kiran Challa a2feeab545 Changed the form tag helpers execution order to be more explicit.
[Fixes #4824] Fix Travis failure for test Microsoft.AspNetCore.Mvc.FunctionalTests.TagHelpersTest.ReregisteringAntiforgeryTokenInsideFormTagHelper_DoesNotAddDuplicateAntiforgeryTokenFields
2016-06-10 11:27:48 -07:00
Pranav Krishnamoorthy 55e9adf84d Generate portable pdbs in coreclr 2016-06-09 17:12:24 -07:00
Ryan Brandenburg 5339a3e0ce Add ExceptionHandled to ExceptionContext (#4825) 2016-06-09 15:22:11 -07:00
Pranav K 8c8fd6446b Use regular PDBs on full desktop when possible
Add a test to verify exceptions thrown from views is pretty printed by diagnostics middleware

Fixes https://github.com/aspnet/Diagnostics/issues/293
Fixes #4737
2016-06-09 14:59:38 -07:00
Ryan Nowak a8142b8858 Fix #4614 - update IModelBinder docs 2016-06-09 14:21:07 -07:00
Kiran Challa f1982bd987 Suppress default status code response type in api descriptions when explicit response types have been provided
[Fixes #4823] How to override the default (200) status code with ProducesResponseType
2016-06-09 12:07:52 -07:00
Doug Bunting 62803d5979 Serialize JSON using camel case by default
- #4283
- update `JsonSerializerSettingsProvider` to choose the `CamelCaseNamingStrategy`
2016-06-09 11:58:23 -07:00
Ryan Nowak 31ec88526a Fix #4801 Rename ValidationExcludeFilter
'ValidationExcludeFilter' -> 'SuppressChildValidationMetadataProvider'

Also moved to .ModelBinding for improved discoverability. There aren't
many reasons user code would have a using for .Validation.
2016-06-09 10:51:31 -07:00
Ryan Nowak baf0b6a5c7 Fix #4803 - Move some types internal
Moves IControllerArgumentBinder and IControllerPropertyActivator into
.Internal. Also renames ControllerArgumentBinder ->
DefaultControllerArgumentBinder for consistency with other controller
extensibility types.

We don't think these are 100% baked for our long term maintenance of the
product, and want to reserve the ability to make changes in the future.
2016-06-09 09:36:15 -07:00
jacalvar 22232bc1bf Fix incorrect import 2016-06-09 01:14:08 -07:00
jacalvar 0c2189e473 Remove unncessary imports 2016-06-09 00:35:44 -07:00
Doug Bunting aecfe778ee Improve handling of custom `ValidationAttribute`s and their `ValidationResult`s
- #3595 sub-items 2 through 4
- handle an indexer name in `ValidationResult.MemberNames`
 - aligns `ModelNames.CreatePropertyModelName()` with `TemplateInfo.GetFullHtmlFieldName()`
- handle multiple elements in `ValidationResult.MemberNames`
 - later elements previously ignored
- set `ValidationContext.MemberName` to `null` when no property name is available
 - using type name for a member name was just wrong
2016-06-08 12:05:01 -07:00
Doug Bunting 14f68b6168 Merge pull request #4623 from tuespetre/conneg
Alter content negotiation algorithm
2016-06-08 09:58:36 -07:00
Derek Gray 5a3875ea72 Alter content negotiation algorithm so that it can be configured (via
MvcOptions) to always respect an explicit Accept header. Fixes #4612.
2016-06-07 16:12:36 -05:00
Ryan Nowak 2e2784aa3d [Design] Split up MvcRouteHandler
This change splits up the conventional routing path from the attribute
routing path *inside* routing, instead of inside `MvcRouteHandler`. Each
attribute route group now gets its own instance of
`MvcAttributeRouteHandler` which just knows about the actions it can
reach.

This removes the concept of a route-group-token and removes the lookup
table entirely for attribute routing. This also means that the
`DefaultHandler` on `IRouteBuilder` will not be used for attribute routes,
which we are OK with for 1.0.0.

The action selector's functionality is now split into two methods. We
think this is OK for 1.0.0 because any customization of `IActionSelector`
up to now had to implement virtually the same policy as ours in order to
work with attribute routing. It should now be possible to customize the
selector in a meaningful way without interfering with attribute routing.
2016-06-07 08:12:47 -07:00
jacalvar 62748b9471 Update Json.NET to 9.0.1-beta1 2016-06-06 21:49:39 -07:00
Ryan Nowak 78c130d226 Fix for #4666 - reduce modelbinders created
This change to ModelBinderFactory makes the caching much more aggressive,
by caching all non-root binders. There's some trickiness here around
making sure we have the right behavior when all providers return null. See
the tests and comments.

I also kept the change I made for a temporary workaround to use a
dictionary rather than a "stack" for cycle breaking.  This seems like an
overall improvement in clarity.
2016-06-06 09:01:51 -07:00
Hao Kung c15cf49a73 React to AuthZ API change 2016-06-03 13:30:53 -07:00
Derek Gray 53b890aab5 Fix filename for DefaultPropertyFilterProvider 2016-06-02 14:56:34 -05:00
Derek Gray 5f36adbee3 Fix filename for ModelValidatorProviderContext (fixes #4798) 2016-06-02 14:34:33 -05:00
N. Taylor Mullen 51c285574b Add `AdditionalCompilationReferences` option to `RazorViewEngineOptions`.
- `AdditionalCompilationReferences` is a purely additive option to add `MetadataReference` instances to be used for Razor compilation.
- Added a test to validate the compilation references get combined with the `ApplicationPartManager`s metadata references.

#4497
2016-06-01 16:32:46 -07:00
mnltejaswini 659cdc3364 React to aspnet/Razor#765. 2016-06-01 11:05:13 -07:00
jacalvar ed8c744041 [Fixes #4218] Adds a comment justifying the use of service locator in this case 2016-05-31 23:59:31 -07:00
jacalvar 4b5df98bc3 [Fixes #4224] Remove use of service locator on ViewExecutor 2016-05-31 23:39:22 -07:00
jacalvar 6a6d2e0d9f [Fixes #4506] Move and rename ActionDescriptor.Name to ControllerActionDescriptor.ActionName 2016-05-31 23:13:20 -07:00
jacalvar 5f4ca4fa66 [Fixes #4223] Added a facade for ViewComponentResult 2016-05-31 22:47:33 -07:00
jacalvar 8493064fe5 [Fixes #4207] Review IActionResult classes and add facades as necessary.
* Moved FileResults to use executor façades
* Changed redirect result types to use executor façades.
2016-05-31 22:46:18 -07:00
Hao Kung 13a3bbaeb6 Update AuthZ test 2016-05-31 17:16:47 -07:00