From 2ba23a4981ba9d1dc62ad5b2cf872bab48a0c932 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Thu, 24 Mar 2022 09:33:34 +0800
Subject: [PATCH 1/2] =?UTF-8?q?123=E6=9C=8D=E5=8A=A1=E5=99=A8=E8=B7=B3?=
=?UTF-8?q?=E8=BF=87=E6=8E=88=E6=9D=83=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/HomeController.cs | 14 ++++++++++----
.../Controllers/LoginController.cs | 19 ++++++++++++-------
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
index 8673ef2c4..b0d2d2d7e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
+++ b/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("");
+ //授权验证
+ var lc = LicenseChecker.CheckLicense();
+ if (!lc.Result)
+ {
+ return Content("");
+ }
}
+
//return View("AdminTop");
string learn_UItheme = WebHelper.GetCookie("Learn_ADMS_V6.1_UItheme");
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
index ca2700b51..e8103a7f2 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
+++ b/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("");
+ //授权验证
+ var lc = LicenseChecker.CheckLicense();
+ if (!lc.Result)
+ {
+ return Content("");
+ }
}
//获取错误次数
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 });
}
}
}
From 5242023e3c9e2c7a728635c9c210bec4c42de97e Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Thu, 24 Mar 2022 09:40:31 +0800
Subject: [PATCH 2/2] =?UTF-8?q?123=E6=9C=8D=E5=8A=A1=E5=99=A8=E8=B7=B3?=
=?UTF-8?q?=E8=BF=87=E6=8E=88=E6=9D=83=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Learun.Application.Web/Controllers/HomeController.cs | 3 +--
.../Learun.Application.Web/Controllers/LoginController.cs | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
index b0d2d2d7e..f306f1d86 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
@@ -425,8 +425,7 @@ namespace Learun.Application.Web.Controllers
public ActionResult Index()
{
//判断当前ip是否是123服务器,如果是123服务器,跳过授权验证
- //获取当前ip
- if (GetIP() != "183.185.97.88")
+ if (Net.Ip != "183.185.97.88" && Net.Ip != "123.57.209.16")
{
//授权验证
var lc = LicenseChecker.CheckLicense();
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
index e8103a7f2..1f00e1e50 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs
@@ -178,8 +178,7 @@ namespace Learun.Application.Web.Controllers
public ActionResult Index()
{
//判断当前ip是否是123服务器,如果是123服务器,跳过授权验证
- //if (Net.Ip != "123.57.209.16")
- if (Net.Ip != "183.185.97.88")
+ if (Net.Ip != "183.185.97.88" && Net.Ip != "123.57.209.16")
{
//授权验证
var lc = LicenseChecker.CheckLicense();