aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Specify culture to int.TryParse #375

Closed Tratcher closed 6 years ago

Tratcher commented 6 years ago

There's guidance to always specify the culture when parsing numbers, otherwise the data may be misinterpreted on some machines depending on the local culture. #356 called this to our attention and these changes should mitigate it. Note there's a deeper corefx issue there that I do not have a repro for and I'll move that to corefx after merging this.

Tratcher commented 6 years ago

I tried adding that test but was not able to repro the original users issue. And you're right, messing with the culture is problematic.