Skip to content

Commit

Permalink
#3731: Update cookie handling with vanilla limits and don't allow unr…
Browse files Browse the repository at this point in the history
…equested cookies
  • Loading branch information
Outfluencer authored and md-5 committed Aug 24, 2024
1 parent 5341487 commit e1d4b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class CookieResponse extends DefinedPacket
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
cookie = readString( buf );
data = readNullable( DefinedPacket::readArray, buf );
data = readNullable( read -> DefinedPacket.readArray( read, 5120 ), buf );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,10 @@ public void handle(CookieResponse cookieResponse)

throw CancelSendSignal.INSTANCE;
}

// if there is no userCon we can't have a connection to a backend server that could have requested this cookie
// which means that this cookie is invalid as the proxy also has not requested it
Preconditions.checkState( userCon != null, "not requested cookie received" );
}

@Override
Expand Down

0 comments on commit e1d4b6a

Please sign in to comment.