prevent empty input from sharing the I2P working dir

This commit is contained in:
Zlatin Balevsky
2019-12-22 22:17:57 +00:00
parent 8e3f76f68c
commit 6283287bee

View File

@ -143,7 +143,7 @@ public class FilesServlet extends HttpServlet {
}
if (action.equals("share")) {
String file = req.getParameter("file");
if (file == null) {
if (file == null || file.trim().length() == 0) {
resp.sendError(403, "Bad param");
return;
}