Skip to content

Use parameter types to get method via reflection#6911

Merged
valadas merged 1 commit intodnnsoftware:developfrom
bdukes:client-resource-reflection
Jan 13, 2026
Merged

Use parameter types to get method via reflection#6911
valadas merged 1 commit intodnnsoftware:developfrom
bdukes:client-resource-reflection

Conversation

@bdukes
Copy link
Copy Markdown
Contributor

@bdukes bdukes commented Jan 13, 2026

Fixes #6909
Thanks @thienvc!

@bdukes bdukes added this to the 10.2.2 milestone Jan 13, 2026
Copy link
Copy Markdown
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

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

Of a fan of us doing this through reflection but given the context, I am fine with this fix.
Thanks!

@valadas valadas merged commit 19af3b0 into dnnsoftware:develop Jan 13, 2026
3 checks passed
@thienvc
Copy link
Copy Markdown
Contributor

thienvc commented Jan 14, 2026

Fixes #6909 Thanks @thienvc!

I suspect that some recent inexplicable anomalies (such as incorrect language/locale, null TabId, or failures to retrieve certain portal settings) might be related to this issue.

We should review the codebase to identify if there are other places using this unsafe 'get method via reflection' pattern. This type of issue is particularly difficult to detect because it appears to fail silently (or swallow exceptions).

(Apologies for any language errors, I'm using Google Translate. :D)

@bdukes
Copy link
Copy Markdown
Contributor Author

bdukes commented Jan 14, 2026

I did review all usages of GetMethod and included another couple of fixes. I believe the Client Resources scenario was the only one that swallowed the exceptions. Thanks again for your investigation and input.

@bdukes bdukes deleted the client-resource-reflection branch January 26, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: AmbiguousMatchException in ClientResourceSettings.GetPortalSettingThroughReflection due to unsafe Reflection call

4 participants