Skip to content

Commit 06a1969

Browse files
authored
fix: cud validation (#761)
1 parent fc8a3a8 commit 06a1969

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [unreleased]
99

10+
## [6.0.8] - 2023-08-01
11+
12+
- Fixes CUD validation starting with number.
13+
1014
## [6.0.7] - 2023-07-28
1115

1216
- Fixes session removing for user with useridmapping when disassociating from tenant.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ compileTestJava { options.encoding = "UTF-8" }
1919
// }
2020
//}
2121

22-
version = "6.0.7"
22+
version = "6.0.8"
2323

2424

2525
repositories {

src/main/java/io/supertokens/webserver/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static String normalizeAndValidateConnectionUriDomain(String connectionUr
4747
throw new ServletException(new WebserverAPI.BadRequestException("connectionUriDomain should not be an empty String"));
4848
}
4949

50-
String hostnameRegex = "^[a-z][a-z0-9-]+(\\.[a-z][a-z0-9-]+)*(:[0-9]+)?$";
50+
String hostnameRegex = "^[a-z0-9-]+(\\.[a-z0-9-]+)*(:[0-9]+)?$";
5151
String ipRegex = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(:[0-9]+)?$";
5252

5353
if (!connectionUriDomain.matches(hostnameRegex) && !connectionUriDomain.matches(ipRegex)) {

src/test/java/io/supertokens/test/multitenant/api/TestPermissionChecks.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ public void testConnectionUriDomainValidationUtil() throws Exception {
487487
"sub-domain.example.com",
488488
"sub-domain.example.com:3567",
489489
"hello.co.uk",
490+
"58hello.abc.com"
490491
};
491492
String[] invalidDomains = new String[]{
492493
"http://localhost",

0 commit comments

Comments
 (0)