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

@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Empty page on repository namespace filter ([#1476](https://github.com/scm-manager/scm-manager/pull/1476))
- Usage of namespace filter and search action together on repository overview ([#1476](https://github.com/scm-manager/scm-manager/pull/1476))
- Fix tooltip arrow height in firefox ([#1479](https://github.com/scm-manager/scm-manager/pull/1479))
- Accidentally blocked requests with non ascii characters ([#1480](https://github.com/scm-manager/scm-manager/issues/1480) and [#1469](https://github.com/scm-manager/scm-manager/issues/1469))
## [2.11.1] - 2020-12-07
### Fixed

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"));