Is it safe to access asp.net session variables through static properties of a static object?
Here is what I mean:
public static class SessionHelper
{
public static int Age
{
get
{
return (int)HttpContext.Current.Session["Age"];
}
set
{
HttpContext.Current.Session["Age"] = value;
}
}
public static string Name
{
get
{
return (string)HttpContext.Current.Session["Name"];
}
set
{
HttpContext.Current.Session["Name"] = value;
}
}
}
Is it possible that userA could access userB's session data this way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…