mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Relax domain name checks in ResponseCookie
Closes gh-23924
This commit is contained in:
@@ -374,7 +374,7 @@ public final class ResponseCookie extends HttpCookie {
|
||||
}
|
||||
int char1 = domain.charAt(0);
|
||||
int charN = domain.charAt(domain.length() - 1);
|
||||
if (char1 == '.' || char1 == '-' || charN == '.' || charN == '-') {
|
||||
if (char1 == '-' || charN == '.' || charN == '-') {
|
||||
throw new IllegalArgumentException("Invalid first/last char in cookie domain: " + domain);
|
||||
}
|
||||
for (int i = 0, c = -1; i < domain.length(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user