Fix accidentally blocked requests with non ascii characters (#1480)

This commit is contained in:
Sebastian Sdorra
2020-12-17 12:03:31 +01:00
committed by GitHub
parent d9af69b1c2
commit 07ec042f22
2 changed files with 5 additions and 1 deletions

View File

@@ -27,7 +27,6 @@ package sonia.scm.lifecycle.modules;
//~--- non-JDK imports --------------------------------------------------------
import com.google.inject.name.Names;
import org.apache.shiro.authc.Authenticator;
import org.apache.shiro.authc.credential.DefaultPasswordService;
import org.apache.shiro.authc.credential.PasswordService;
@@ -119,6 +118,10 @@ public class ScmSecurityModule extends ShiroWebModule
// bind constant
bindConstant().annotatedWith(Names.named("shiro.loginUrl")).to("/index.html");
// do not block non ascii character,
// because this would exclude languages which are non ascii based
bindConstant().annotatedWith(Names.named("shiro.blockNonAscii")).to(false);
// disable access to mustache resources
addFilterChain("/**.mustache", filterConfig(ROLES, "nobody"));