mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-30 13:39:57 +00:00
Turn on XSRF for Firefox
This commit is contained in:
@@ -52,12 +52,9 @@ public class SendServlet extends HttpServlet {
|
|||||||
resp.setContentType("text/plain");
|
resp.setContentType("text/plain");
|
||||||
|
|
||||||
// Basic XSRF protection
|
// Basic XSRF protection
|
||||||
if (req.getHeader("X-Extension") == null &&
|
if (req.getHeader("X-Extension") == null) {
|
||||||
req.getHeader("User-Agent").indexOf("Firefox") == -1) { // TODO: Remove exception for Firefox
|
|
||||||
resp.setStatus(400);
|
resp.setStatus(400);
|
||||||
resp.getWriter().println(ERROR_STATUS + " You are using an old version of the extension that is no " +
|
resp.getWriter().println(ERROR_STATUS + " - Please upgrade your extension");
|
||||||
"longer supported. Please install v0.2 or later of the extension " +
|
|
||||||
"from http://code.google.com/p/chrometophone.");
|
|
||||||
log.warning("Missing X-Extension header");
|
log.warning("Missing X-Extension header");
|
||||||
resp.setStatus(400);
|
resp.setStatus(400);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user