浏览代码

123服务器跳过授权验证

西昌缴费二期
zhangli 2 年前
父节点
当前提交
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] [HttpGet]
public ActionResult Index() 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"); //return View("AdminTop");
string learn_UItheme = WebHelper.GetCookie("Learn_ADMS_V6.1_UItheme"); 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] [HttpGet]
public ActionResult Index() 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(); ViewBag.errornum = OperatorHelper.Instance.GetCurrentErrorNum();
@@ -576,16 +581,16 @@ namespace Learun.Application.Web.Controllers
{ {
if (userEntity.F_ModifyPwdDate.HasValue) 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 }); return Success(new { pwdtip = true });
} }
} }
else 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 });
} }
} }
} }


正在加载...
取消
保存