Index: ssts-web/src/main/webapp/logonSSOForBjdxzlyy.jsp =================================================================== diff -u -r32283 -r33370 --- ssts-web/src/main/webapp/logonSSOForBjdxzlyy.jsp (.../logonSSOForBjdxzlyy.jsp) (revision 32283) +++ ssts-web/src/main/webapp/logonSSOForBjdxzlyy.jsp (.../logonSSOForBjdxzlyy.jsp) (revision 33370) @@ -18,30 +18,30 @@ <% ArrayList message = new ArrayList(); String userName = request.getParameter("userName"); +String targetPage = request.getParameter("targetPage"); String time = request.getParameter("loginTime"); String md5 = request.getParameter("md5"); //HIS系统和追溯系统约定的salt字符串为:201911070087@ABC String salt = "201911070087@ABC"; -System.out.println("userName=" + userName + " time=" + time + " md5=" + md5); if(StringUtils.isNotBlank(userName) || StringUtils.isNotBlank(time) || StringUtils.isNotBlank(md5)){ session.removeAttribute("message"); try{ - // 请求时间 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date d1 = sdf.parse(time); - long s1 = d1.getTime(); - // 服务器当前时间 - long s2 = System.currentTimeMillis(); - // 检查当前的时间跟传入的时间的间隔,间隔时间不能大于120秒 - if ((s2 - s1) > 120000) { - throw new RuntimeException("请求时间无效"); + if(StringUtils.isBlank(targetPage)){ + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date d1 = sdf.parse(time); + long s1 = d1.getTime(); + // 服务器当前时间 + long s2 = System.currentTimeMillis(); + // 检查当前的时间跟传入的时间的间隔,间隔时间不能大于120秒 + if ((s2 - s1) > 120000) { + throw new RuntimeException("请求时间无效"); + } + // 校验md5码 + String md5Str = CoderEncryption.encryptMD5(userName + time + salt, "UTF-8"); + if (!StringUtils.equals(md5, md5Str)) { + throw new RuntimeException("md5码校验出错"); + } } - // 校验md5码 - String md5Str = CoderEncryption.encryptMD5(userName + time + salt, "UTF-8"); - System.out.println(md5Str); - if (!StringUtils.equals(md5, md5Str)) { - throw new RuntimeException("md5码校验出错"); - } // 查询用户信息 if(StringUtils.isNotBlank(userName)){ UserManager userManager=(UserManager)SpringBeanManger.getBean("userManager"); @@ -61,6 +61,7 @@ message.add("参数不能为空"); } pageContext.setAttribute("message", message); +session.setAttribute("targetPage",targetPage); String companyName = CssdUtils.getSystemSetConfigByName("companyName"); String companyNameStr = ""; @@ -74,7 +75,6 @@ session.setAttribute("profile", project); String imgPath = "disinfectsystem/config/" + project + "/img/logo_" + project +".png"; -//System.out.println(application.getRealPath("/") + imgPath); File file = new File(application.getRealPath("/") + imgPath); if(file.exists()){ request.setAttribute("logoPath",imgPath);