Change regex for Firefox

This commit is contained in:
burke.davey
2010-07-22 01:44:08 +00:00
parent 05ded87c1c
commit a1424f809f

View File

@@ -56,8 +56,8 @@ public class AuthServlet extends HttpServlet {
// Sanitize the extRet URL for XSS protection
String regExChrome = "chrome-extension://[a-z]+" +
(signIn ? "/signed_in\\.html" : "/signed_out\\.html");
String regExFirefox = "chrome://sendtophone" +
(signIn ? "/loggedIn" : "/loggedOut");
String regExFirefox = "http://code\\.google\\.com/p/chrometophone/logo\\?" +
(signIn ? "login" : "logout");
if (extRet.matches(regExChrome) || extRet.matches(regExFirefox)) {
resp.getWriter().println("<meta http-equiv=\"refresh\" content=\"0;url=" + extRet + "\">");
} else {