Fixed possible issue in TryCookieLogin (null username and/or loginKey).
This commit is contained in:
parent
59a6592b76
commit
1f3023f33d
2 changed files with 4 additions and 2 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
|||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("3.0.2.510")]
|
||||
[assembly: AssemblyFileVersion("3.0.2.510")]
|
||||
[assembly: AssemblyVersion("3.0.2.511")]
|
||||
[assembly: AssemblyFileVersion("3.0.2.511")]
|
||||
|
|
|
@ -635,6 +635,8 @@ namespace ScrewTurn.Wiki {
|
|||
/// <param name="loginKey">The login key.</param>
|
||||
/// <returns>The correct UserInfo object, or <c>null</c>.</returns>
|
||||
public static UserInfo TryCookieLogin(string username, string loginKey) {
|
||||
if(string.IsNullOrEmpty(username) || string.IsNullOrEmpty(loginKey)) return null;
|
||||
|
||||
if(username == "admin" && loginKey == ComputeLoginKey(username, Settings.ContactEmail, DateTime.MinValue)) {
|
||||
// Just return, no notification to providers because the "admin" account is fictitious
|
||||
return GetAdministratorAccount();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue