mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-30 13:39:57 +00:00
Change regex for Firefox
This commit is contained in:
@@ -56,8 +56,8 @@ public class AuthServlet extends HttpServlet {
|
|||||||
// Sanitize the extRet URL for XSS protection
|
// Sanitize the extRet URL for XSS protection
|
||||||
String regExChrome = "chrome-extension://[a-z]+" +
|
String regExChrome = "chrome-extension://[a-z]+" +
|
||||||
(signIn ? "/signed_in\\.html" : "/signed_out\\.html");
|
(signIn ? "/signed_in\\.html" : "/signed_out\\.html");
|
||||||
String regExFirefox = "chrome://sendtophone" +
|
String regExFirefox = "http://code\\.google\\.com/p/chrometophone/logo\\?" +
|
||||||
(signIn ? "/loggedIn" : "/loggedOut");
|
(signIn ? "login" : "logout");
|
||||||
if (extRet.matches(regExChrome) || extRet.matches(regExFirefox)) {
|
if (extRet.matches(regExChrome) || extRet.matches(regExFirefox)) {
|
||||||
resp.getWriter().println("<meta http-equiv=\"refresh\" content=\"0;url=" + extRet + "\">");
|
resp.getWriter().println("<meta http-equiv=\"refresh\" content=\"0;url=" + extRet + "\">");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user