diff --git a/Makefile b/Makefile index d5266f82a0..89e4e07ae5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -version = 2.8.0 +version = 2.8.1 NODE = node # Sets a custom hook path in the local git config. diff --git a/bin/run-klaw.bat b/bin/run-klaw.bat index 0dfa64f9da..d457bc28a6 100644 --- a/bin/run-klaw.bat +++ b/bin/run-klaw.bat @@ -4,7 +4,7 @@ SET CURRENTDIR="%cd%" set DIR=%~dp0..\ cd %DIR% -set version=2.8.0 +set version=2.8.1 set core_lib=.\core\target\klaw-%version%.jar set cluster_lib=.\cluster-api\target\cluster-api-%version%.jar set core_config=.\core\target\classes\application.properties diff --git a/bin/run-klaw.sh b/bin/run-klaw.sh index 17fa474196..86629b96a9 100644 --- a/bin/run-klaw.sh +++ b/bin/run-klaw.sh @@ -4,7 +4,7 @@ WORKING_DIR="$(dirname "$0")"/.. cd $WORKING_DIR # Declarations -version=2.8.0 +version=2.8.1 core_lib=./core/target/klaw-${version}.jar cluster_lib=./cluster-api/target/cluster-api-${version}.jar core_config=./core/target/classes/application.properties diff --git a/core/src/main/java/io/aiven/klaw/service/UsersTeamsControllerService.java b/core/src/main/java/io/aiven/klaw/service/UsersTeamsControllerService.java index 2d732c873b..549703a1b1 100644 --- a/core/src/main/java/io/aiven/klaw/service/UsersTeamsControllerService.java +++ b/core/src/main/java/io/aiven/klaw/service/UsersTeamsControllerService.java @@ -72,6 +72,7 @@ public class UsersTeamsControllerService { public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); public static final String MASKED_PWD = "********"; public static final String UNUSED_PASSWD = "unusedpasswd"; + private static final Pattern emailUsernamePattern = Pattern.compile("^[A-Za-z0-9+_.-]+@(.+)$"); @Value("${klaw.login.authentication.type}") private String authenticationType; @@ -1096,8 +1097,9 @@ private Object getPrincipal() { } private boolean userNamePatternValidation(String userName) { - Matcher m1 = defaultPattern.matcher(userName); - return m1.matches(); + Matcher m1 = emailUsernamePattern.matcher(userName); + Matcher m2 = defaultPattern.matcher(userName); + return m1.matches() || m2.matches(); } public List getSwitchTeams(String userId) { diff --git a/openapi.yaml b/openapi.yaml index c00a04455c..f0fe3f12fd 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -10,7 +10,7 @@ "name" : "Apache 2.0", "url" : "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version" : "2.8.0" + "version" : "2.8.1" }, "externalDocs" : { "description" : "Klaw documentation", diff --git a/pom.xml b/pom.xml index 182e6bab95..440ddff401 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ - 2.8.0 + 2.8.1 UTF-8 UTF-8 17