Turn on XSRF for Firefox

This commit is contained in:
burke.davey
2010-06-17 22:44:43 +00:00
parent 9d7e78abea
commit 11e794d477

View File

@@ -52,12 +52,9 @@ public class SendServlet extends HttpServlet {
resp.setContentType("text/plain");
// Basic XSRF protection
if (req.getHeader("X-Extension") == null &&
req.getHeader("User-Agent").indexOf("Firefox") == -1) { // TODO: Remove exception for Firefox
if (req.getHeader("X-Extension") == null) {
resp.setStatus(400);
resp.getWriter().println(ERROR_STATUS + " You are using an old version of the extension that is no " +
"longer supported. Please install v0.2 or later of the extension " +
"from http://code.google.com/p/chrometophone.");
resp.getWriter().println(ERROR_STATUS + " - Please upgrade your extension");
log.warning("Missing X-Extension header");
resp.setStatus(400);
return;