mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Fix infinite recursive loop causing application freeze
In the 'getInputStream()' contains an infinite recursive loop when 'needRequestRestore' was true and the 'body' was not null. Fixes #22010
This commit is contained in:
parent
90a88976b6
commit
442adfa495
@ -171,7 +171,6 @@ public class FilterSessionStore implements AdapterSessionStore {
|
||||
|
||||
@Override
|
||||
public ServletInputStream getInputStream() throws IOException {
|
||||
|
||||
if (needRequestRestore && body != null) {
|
||||
final ByteArrayInputStream is = new ByteArrayInputStream(body);
|
||||
return new ServletInputStream() {
|
||||
@ -179,14 +178,18 @@ public class FilterSessionStore implements AdapterSessionStore {
|
||||
public int read() throws IOException {
|
||||
return is.read();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
return isFinished();
|
||||
return is.available() == 0; // Check if the underlying stream has data available.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReady() {
|
||||
return isReady();
|
||||
return true; // Return true to indicate that the data is always ready to be read.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setReadListener(ReadListener readListener) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user