| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.net.URLDecoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) { |
| | | return fail("文件ID和密码不能为空", null); |
| | | } |
| | | if (!pwd.endsWith("=")) { |
| | | pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name()); |
| | | } |
| | | |
| | | String password = downloadService.decryptPwd(pwd); |
| | | if (null == password) { |
| | | return fail("密码解密失败", null); |
| | |
| | | if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) { |
| | | WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "文件ID和密码不能为空", res); |
| | | } |
| | | if (!pwd.endsWith("=")) { |
| | | pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name()); |
| | | } |
| | | |
| | | String password = downloadService.decryptPwd(pwd); |
| | | if (null == password) { |
| | | WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "密码解密失败", res); |