mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-22 09:41:51 +00:00
XSRF protection
This commit is contained in:
@@ -48,6 +48,14 @@ public class SendServlet extends HttpServlet {
|
|||||||
@Override
|
@Override
|
||||||
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
|
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
|
||||||
resp.setContentType("text/plain");
|
resp.setContentType("text/plain");
|
||||||
|
|
||||||
|
//String extHeader = req.getHeader("X-Extension"); // simple XSRF protection
|
||||||
|
//if (extHeader == null) {
|
||||||
|
// resp.setStatus(400);
|
||||||
|
// resp.getWriter().println(ERROR_STATUS + " (Unauthorized: Please install latest extension)");
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
|
||||||
String sel = req.getParameter("sel");
|
String sel = req.getParameter("sel");
|
||||||
if (sel == null) sel = ""; // optional
|
if (sel == null) sel = ""; // optional
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user