Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed HandleTwoWayBindingToPropertyWithNonPublicSetter compat flag #1502

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

ojhad
Copy link
Contributor

@ojhad ojhad commented Aug 1, 2019

Issue number: #1379

Two-way binding to properties with non-public setters was being allowed because we took on behavior that was caused by a bug in .NET Framework 4.5. Back then, a compatibility flag was introduced due to this 4.5 bug. We no longer want to support this scenario because we want correct behavior in .NET Core and we want the behavior to be on parity with net472/8. So there is no longer need for the compat flag.

Ran a full DRT pass against this change and it was successful.

@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Aug 1, 2019
@ghost ghost requested a review from SamBent August 1, 2019 22:56
Copy link
Contributor

@SamBent SamBent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we spoke, I thought Vatsan wanted to leave the flag in place and merely change the default to Throw, to ease migration of 4.5 apps that depended on the insecure behavior. But I like this better - it removes the security hole altogether, and forces migrators to actually fix their apps.

@weltkante
Copy link

Related to Issue #1379 (wasn't auto-linked properly due to missing '#' sign in PR description)

@vatsan-madhavan
Copy link
Member

@ojhad there is a corresponding sample in Microsoft/wpf-samples that needs a minor-fixup.

@vatsan-madhavan
Copy link
Member

@weltkante fixed in the main description. Deliberately not using "Fixes " notation in PR's for a couple of weeks. We don't want the linked issues to be auto-closed as soon as the PR merges since the issues are being reviewed offline by .NET Core shiproom...

@vatsan-madhavan
Copy link
Member

When we spoke, I thought Vatsan wanted to leave the flag in place and merely change the default to Throw, to ease migration of 4.5 apps that depended on the insecure behavior. But I like this better - it removes the security hole altogether, and forces migrators to actually fix their apps.

That was what we were thinking originally, but after further thought and taking into account your position that this was one of the rare instances where breaking compatibility (which really only applies under a narrow set of conditions - apps targeting .NET 4.5 and relying on a bug in a way that is really bad) is probably the right thing to do, we decided to fix it the right way.

@vatsan-madhavan vatsan-madhavan added the tell-mode Issues and PR's that require notice to .NET Core Shiproom label Aug 3, 2019
@vatsan-madhavan vatsan-madhavan added this to the 3.0 milestone Aug 3, 2019
@ojhad ojhad merged commit 69f6a51 into master Aug 5, 2019
@vatsan-madhavan vatsan-madhavan deleted the user/ojhad/twowaybindingreadonly branch August 23, 2019 20:11
@ghost ghost locked as resolved and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage tell-mode Issues and PR's that require notice to .NET Core Shiproom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants