-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
There was a problem hiding this 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.
Related to Issue #1379 (wasn't auto-linked properly due to missing '#' sign in PR description) |
@ojhad there is a corresponding sample in Microsoft/wpf-samples that needs a minor-fixup. |
@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... |
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. |
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.