Commit bb076059 authored by daniel's avatar daniel

Merge remote-tracking branch 'origin/master'

parents 1adc68f8 32a41456
......@@ -33,7 +33,7 @@ public class LogInterceptor extends JService implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception { //线程绑定变量(该数据只有当前请求的线程可见)
log.info("URI:" + request.getRequestURI() + ",\n param:" + RequestParamHelper.createLinkString(RequestParamHelper.getRequestParamMap(request)));
// log.info("URI:" + request.getRequestURI() + ",\n param:" + RequestParamHelper.createLinkString(RequestParamHelper.getRequestParamMap(request)));
return true;
}
......
......@@ -55,7 +55,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
}
Map<String, Object> queryParams = getQueryParams(request);
logger.info("请求URL:"+request.getRequestURI()+queryParams);
// logger.info("请求URL:"+request.getRequestURI()+queryParams);
if (handler instanceof HandlerMethod) {
HandlerMethod handlerMethod = (HandlerMethod) handler;
Method method = handlerMethod.getMethod();
......@@ -80,8 +80,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
String sign = request.getParameter("sign");
String cId = request.getParameter("cId");
String uId = request.getParameter("uId");
String str = "cId=" + cId + "&timestamp=" + timestamp + "&uId=" + uId;
log.info("请求路径:" + str + ",sign:" + DigestUtils.md5DigestAsHex(str.getBytes()) + ",psign:" + sign);
// log.info("请求路径:" + str + ",sign:" + DigestUtils.md5DigestAsHex(str.getBytes()) + ",psign:" + sign);
if (NumberUtils.toInt(uId, -1) == -1 || NumberUtils.toInt(uId, -1) == 0) {
log.info("无用户信息登录");
response.sendRedirect("http://timer.geexek.com");
......@@ -91,6 +90,7 @@ public class SecurityInterceptor extends JService implements HandlerInterceptor
log.info("无权限!");
throw new RuntimeException("无权限");
}
String str = "cId=" + cId + "&timestamp=" + timestamp + "&uId=" + uId;
if (!DigestUtils.md5DigestAsHex(str.getBytes()).equals(sign)) {
log.info("签名不一致!");
throw new RuntimeException("签名不一致!");
......
......@@ -31,7 +31,7 @@ public class PhotoController {
@RequestMapping("index/{cmptId}")
@PageView
public ModelAndView index(@PathVariable("cmptId") Integer cmptId,
@RequestParam("uId") Integer userId,
@RequestParam(value = "uId",required = false, defaultValue = "-1") Integer userId,
ModelAndView mv) {
Cmpt cmpt = cmptService.queryCmptBycmptId(cmptId);
int nueuserId = cmptService.getCommonNeuUserId(userId);
......
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