Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Issue: WebSecurity.CreateUserAndAccount IDictionary casting [870]

$
0
0
The WebSecurity.CreateUserAndAccount method checks for an input on the propertyValues parameter and converts it to a RouteValueDictionary before it is passed on to the ExtendedMembershipProvider.

When constructing a RouteValueDictionary using an object (typeof object), the result is unexpected ... item/indexing is lost. In this case, the new keys are "keys" and "values".

Casting the input to an IDictionary<string, object> fixes the issue.

Current:
```
IDictionary<string, object> values = null;
if (propertyValues != null)
{
values = new RouteValueDictionary(propertyValues);
}
```

Suggested:
```
values = new RouteValueDictionary((IDictionary<string, object>)propertyValues);
```

I'm not clear on why the propertyValues parameter is an object type and not IDictionary<string, object>. Either the type should be changed or type assignment checking should be performed.
Comments: verified.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>