Просмотр исходного кода

123服务器跳过授权验证

西昌缴费二期
zhangli 2 лет назад
Родитель
Сommit
2ba23a4981
2 измененных файлов: 22 добавлений и 11 удалений
  1. +10
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  2. +12
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs

+ 10
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Просмотреть файл

@@ -424,12 +424,18 @@ namespace Learun.Application.Web.Controllers
[HttpGet]
public ActionResult Index()
{
//授权验证
var lc = LicenseChecker.CheckLicense();
if (!lc.Result)
//判断当前ip是否是123服务器,如果是123服务器,跳过授权验证
//获取当前ip
if (GetIP() != "183.185.97.88")
{
return Content("<script>alert('" + lc.Message + "');location.href='/ShowRegister/Index';</script>");
//授权验证
var lc = LicenseChecker.CheckLicense();
if (!lc.Result)
{
return Content("<script>alert('" + lc.Message + "');location.href='/ShowRegister/Index';</script>");
}
}

//return View("AdminTop");
string learn_UItheme = WebHelper.GetCookie("Learn_ADMS_V6.1_UItheme");



+ 12
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs Просмотреть файл

@@ -177,11 +177,16 @@ namespace Learun.Application.Web.Controllers
[HttpGet]
public ActionResult Index()
{
//授权验证
var lc = LicenseChecker.CheckLicense();
if (!lc.Result)
//判断当前ip是否是123服务器,如果是123服务器,跳过授权验证
//if (Net.Ip != "123.57.209.16")
if (Net.Ip != "183.185.97.88")
{
return Content("<script>alert('" + lc.Message + "');location.href='/ShowRegister/Index';</script>");
//授权验证
var lc = LicenseChecker.CheckLicense();
if (!lc.Result)
{
return Content("<script>alert('" + lc.Message + "');location.href='/ShowRegister/Index';</script>");
}
}
//获取错误次数
ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum();
@@ -576,16 +581,16 @@ namespace Learun.Application.Web.Controllers
{
if (userEntity.F_ModifyPwdDate.HasValue)
{
if ((DateTime.Now-userEntity.F_ModifyPwdDate.Value).Days>30)
if ((DateTime.Now - userEntity.F_ModifyPwdDate.Value).Days > 30)
{
return Success(new { pwdtip = true });
}
}
else
{
if (userEntity.F_CreateDate.HasValue && (DateTime.Now-userEntity.F_CreateDate.Value).Days>30)
if (userEntity.F_CreateDate.HasValue && (DateTime.Now - userEntity.F_CreateDate.Value).Days > 30)
{
return Success(new { pwdtip=true });
return Success(new { pwdtip = true });
}
}
}


Загрузка…
Отмена
Сохранить