Browse Source

去掉编辑器有漏洞的方法

黑龙江艺术高中职
dao 1 month ago
parent
commit
f32496d8a6
1 changed files with 22 additions and 22 deletions
  1. +22
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs

+ 22
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/UtilityController.cs View File

@@ -269,29 +269,29 @@ namespace Learun.Application.Web.Controllers
}.ToJson());
}

public ActionResult CrawlerHandler()
{
string[] sources = Request.Form.GetValues("source[]");
if (sources == null || sources.Length == 0)
{
return Content(new
{
state = "参数错误:没有指定抓取源"
}.ToJson());
}
//public ActionResult CrawlerHandler()
//{
// string[] sources = Request.Form.GetValues("source[]");
// if (sources == null || sources.Length == 0)
// {
// return Content(new
// {
// state = "参数错误:没有指定抓取源"
// }.ToJson());
// }

UeditorCrawler[] crawlers = sources.Select(x => new UeditorCrawler(x).Fetch()).ToArray();
return Content(new
{
state = "SUCCESS",
list = crawlers.Select(x => new
{
state = x.State,
source = x.SourceUrl,
url = x.ServerUrl
})
}.ToJson());
}
// UeditorCrawler[] crawlers = sources.Select(x => new UeditorCrawler(x).Fetch()).ToArray();
// return Content(new
// {
// state = "SUCCESS",
// list = crawlers.Select(x => new
// {
// state = x.State,
// source = x.SourceUrl,
// url = x.ServerUrl
// })
// }.ToJson());
//}
private string GetStateMessage(UeditorUploadState state)
{
switch (state)


Loading…
Cancel
Save