Description
Fixes#27494
A community PR introduced new overloads to ControllerBase for SignIn. The new overload throws due to an existing check which blocks when the scheme is null. The fix is to remove this unnecessary check. Note SignOutResult already had test coverage for this usage and is unaffected
Customer Impact
The bug was reported by a customer trying to use the new overload. The fix enables the method to be used.
Regression?
No
Risk
Low as this is a new API, and the api was unuseable in its current form.
* Move all PublicAPI.Unshipped.txt files to PublicAPI.Shipped.txt
- we have now shipped this API surface
* Add eng/PublicAPI.empty.txt file
- make it easier to add new implementation projects
* Add missing public API baseline files
- #26784 part 1/2
- a few unexpected files turned up missing beyond the #26784 list…
* Reference Microsoft.CodeAnalysis.PublicApiAnalyzers more often
- #27484 part 2/2
- emit errors when API baseline files are missing
- update categorization of some projects
- specification tests are not implementation projects
- but _were_ project reference providers (keep that)
- correct `$(IsTestAssetProject)` setting for Razor shims et cetera
- correct `$(IsSampleProject)` setting for casing of some Sample directories
- Microsoft.AspNetCore.Analyzer.Testing should be treated as test asset
- add `$(AddPublicApiAnalyzers)` property to support overrides
- e.g. for `msbuild` task projects and tools
nit:
- remove useless `$(IsTestProject)` setting in a specification test project
- wrap some long `Condition`s
* Do not run public API analyzer in `RazorCoreCompile` target
* Remove old `$(EnableApiCheck)` settings
- property does nothing
- also remove a dangling ApiCheck comment
* Ensure AppLocalResolver handles package with multiple libs
This was failing to pass references to a package which contains more
than one lib.
* Use `AppBaseCompilationAssemblyResolver` in `DiagnosticProject`
* Fix, then reduce use of `TestPathUtilities.GetSolutionRootDirectory(...)` (#27404)
- do not traverse up past the `$(RepoRoot)` when running tests locally
- if `$(RepoRoot)` is reached, search down for named `*.slnf` file
- find `*.slnf` file when `$(OutputPath)` is under artifacts/bin/
- analyzer test projects publish needed files anyhow
- remove `GetProjectDirectory()` helpers
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* !!! Correct condition controlling `public` API analysis !!!
- #26785 demonstrated analyzers were inoperable
* Remove unused `public` API files
* Update `public` API files
- three Components files were missing `#nullable enable`
- `nullable` annotations missing or out-of-date elsewhere
* Ignore `public` API files completely during source build
- do not warn about unused files
* Update more `public` API files
* Fix client validation for record types
Server validation for record types uses metadata from parameters
when validating record type properties. However client validation
does not use the parameter to harvest client validation attributes.
In the absence of this change, validation on parameters would require server
round trips which is unexcepted and not at parity with validation applied
to properties on regular classes or record types.
Validation experience with record types is subpar and requires server
round trips.
No. This feature is new to 5.0.
Low. The change is isolated to record types and does not affect other code paths. We have
unit and functional test coverage to verify this change.
* Correctly dispose app after use
* Create data sources "per router" instance.
* Make a global shared order sequence "per router" for conventional and
controller and page routes.
* Create DynamicControllerEndpointSelector and DynamicPageEndpointSelector
instances per data source.
This lets MVC use the defaults as specified by System.Text.Json. Right now, these defaults are identical
to the two properties that were removed. However this allows MVC to pick up new S.T.J defaults in 6.0 including when
users attempt to use a 6.0 versioned package with 5.0
* Record type follow ups:
* Throw an error if a record type property has validation metadata
* Disallow TryUpdateModel on a top-level record type
* Ignore previously specified model value when binding a record type
* Unskip record type tests
* Clean up record type detection
* Update src/Mvc/Mvc.Abstractions/src/Resources.resx
Co-authored-by: James Newton-King <james@newtonking.com>
* Fixup tests
* Update src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelMetadata.cs
* Update src/Mvc/Mvc.Abstractions/src/ModelBinding/ModelMetadata.cs
* Update src/Mvc/Mvc.Abstractions/src/Resources.resx
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* Update src/Mvc/Mvc.Core/src/Resources.resx
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Doug Bunting <6431421+dougbu@users.noreply.github.com>
* Guard against client disconnect exceptions that appear when performing ReadFormAsync
Reading the request body may throw an exception. This change adds some extra guards
for this and presents this as a 4xx response rather than a 5xx response.
* Add some tests
* Fixup test
Create new instances of List<T> with an appropriate capacity for the items that will be added.
Use Array.Empty<T>() where appropriate, rather than create an empty list and then return it.
* Add support for model binding DateTime as UTC
Fixes https://github.com/dotnet/aspnetcore/issues/11584
* Make test work in other TZs
* Changes per PR comments
* Cleanup unused exception code path, fix doc comments
* Clean up usage of variables
* Adjust logging to be consistent
* Apply suggestions from code review
* Implement CopyToAsync in the FileBufferingReadStream
- overrride Span and Memory overloads and implement array overloads in terms of those overloads.
- Implemented CopyToAsync (but not CopyTo)
- Added tests
Fixes#24032
* Updated PublicAPI.Unshipped
* Improve record type detection
Support both forms of Clone methods to detect record types
Co-authored-by: Pranav K <prkrishn@hotmail.com>
* Use Microsoft.CodeAnalysis.PublicApiAnalyzers
- #4259 1/2
- followup 2/3 for 5266918ed2
- includes baselines for 16 MVC projects
- will automated further additions in another PR
- suppress warnings that may cause back-compat problems if fixed
nit: sort `@(LatestPackageReference)` a bit better
* Add support for binding record types
* PR feedback
* PR changes
* Changes per PR comments
* Changes per PR comments
* Update src/Mvc/Mvc.Core/src/Resources.resx
* Apply suggestions from code review
* Add some more tests
* Undo blazor.server.js changes
* Fixup test
* Apply suggestions from code review
Cleaned up error messages. Thanks @jamesnk, I totally overlooked the content.
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>
Co-authored-by: James Newton-King <james@newtonking.com>
* Remove all ref/ projects
* Remove GenAPI infrastructure
* Remove notion of a reference assembly project
- remove `$(IsReferenceAssemblyProject)`, `$(ReferenceReferenceAssemblies)` and `$(ReferenceImplementationAssemblies)`
- remove unnecessary `$(NoWarn)` settings
nits:
- remove a few misleading comments
- wrap some long lines
* Move .0 package version workaround into Versions.props
- touch up SharedFramework.External.props
* Expose `%(LatestPackageReference.RTMVersion)` metadata
- automate use of properties in the `@(LatestPackageReference)` item group to make this maintainable
- add a couple of special cases at the bottom of eng/Dependencies.props
- add one more `$(...PackageVersion)` property to avoid yet-another special case
* Enable Roslyn reference assemblies
- exclude ref/ assembly from packages other than targeting pack
- update Microsoft.AspNetCore.App.Ref.csproj
- `%(IsReferenceAssembly)` and `%(ReferenceGrouping)` metadata no longer relevant
- only ref/ assemblies are in `@(ReferencePathWithRefAssemblies)` item group
nits:
- remove now-unnecessary workaround
- issues with TFM transition are behind us
- clean up Microsoft.AspNetCore.App.Runtime.csproj slightly
- use `GeneratePathProperty="true"`
- reorder item / property settings for meta-expansion
- correct spelling errors and phrasing in comments
* Update documentation to reflect recent changes
- remove CrossRepoBreakingChanges.md; was tied to old TeamCity infrastructure
- also much less relevant given repo merges
- adjust details and examples in ReferenceResolution.md
- reflect repo merges, Dependencies.props changes, and current Maestro++ channels
- add a few more details e.g. specific files where Version.Details.xml versions are used
* !fixup! Remove another irrelevant doc file
* !fixup! Address PR review suggestions
- convert a couple of warnings to errors
- use consistent casing for Microsoft.NETCore.App.Runtime.* packages
- reduce `%(LatestPackageReference.Version)` metadata special cases
- add and improve comments e.g.
- improve comments about `$(*V0PackageVersion)` properties
- improve placement of comments about item removal in ResolveReferences.targets
- confirmed `$(*V0PackageVersion)` property list is complete
nits:
- fix solution example in ReferenceResolution.md
- remove item group definition for `@(LatestPackageReference)`
- remove `%(LatestPackageReference.VersionName)` metadata after use; large item group
- similarly, remove `%(LatestPackageReference.RTMVersion)` when not needed; just complicates `Condition`s
When I squash, I must remember this fixes
- #14801
- dotnet/aspnetcore-internal#2693
* Actually use `%(LatestPackageReference.RTMVersion)` metadata
- gather RTM package references in a new project
- a (very) separate project to work around package conflict resolution
- empty `Test` target works around Arcade's testing approach
- new target in ResolveReferences.targets updates relevant assembly paths to use the RTM packages
- done as soon as possible after `ResolvePackageAssets` determines the paths
- done for all compilation inputs, not just ref/ assemblies
All rules are currently disabled, except for one that I enabled for
src/Http via a new ".editorconfig" file I added there.
Other changes:
* Allow editorconfigs in MVC and Razor to flow to the root
* Consolidate a few editorconfig settings
* Tweak Ruleset config in Azure/AzureAD where it clashed.
Addresses the beginning of #9620, but it's a fair chunk of work to
enable most rules through the whole repo. That can be done directory by
directory and rule by rule by dropping .editorconfig files though.
* Use preferred overloads of string.Split
* Revert TrimEntries for netstandard2.0
Revert usage of StringSplit.TrimEntries for projects that target netstandard2.0.
Co-authored-by: Levi Broderick <levib@microsoft.com>