Commit 079bed58 authored by zhangqingle's avatar zhangqingle

关闭外链验证

parent b0657456
...@@ -60,12 +60,12 @@ public class BBannerServiceImpl implements BBannerService { ...@@ -60,12 +60,12 @@ public class BBannerServiceImpl implements BBannerService {
// if (!pattern.matcher(model.getExternalUrl()).matches()) { // if (!pattern.matcher(model.getExternalUrl()).matches()) {
// throw new ServiceException(ResultServiceEnums.ILLEGAL_URL); // throw new ServiceException(ResultServiceEnums.ILLEGAL_URL);
// } // }
try { // try {
URL url = new URL(model.getExternalUrl()); // URL url = new URL(model.getExternalUrl());
InputStream in = ((URL) url).openStream(); // InputStream in = ((URL) url).openStream();
} catch (Exception e1) { // } catch (Exception e1) {
throw new ServiceException(ResultServiceEnums.ILLEGAL_URL); // throw new ServiceException(ResultServiceEnums.ILLEGAL_URL);
} // }
} }
//内部链接但类型或课程ID为空或长度为0 抛异常 //内部链接但类型或课程ID为空或长度为0 抛异常
if (IsExternalLinkEnum.NOT_EXTERNAL_LINK.getCode().equals(model.getIsExternalLink()) && (StringUtils.isEmpty(model.getLineType()) || StringUtils.isEmpty(model.getCourseId()))) if (IsExternalLinkEnum.NOT_EXTERNAL_LINK.getCode().equals(model.getIsExternalLink()) && (StringUtils.isEmpty(model.getLineType()) || StringUtils.isEmpty(model.getCourseId())))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment