Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Protect readLine() against DoS
  • Loading branch information
pixeebot[bot] authored Mar 1, 2025
commit 0d7595e3564c00ff351b55fc2856aff7bf3bfdf5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.github.megatronking.netbare.NetBareLog;
import com.github.megatronking.netbare.NetBareUtils;
import io.github.pixee.security.BoundedLineReader;

import java.io.BufferedReader;
import java.io.IOException;
Expand Down Expand Up @@ -80,7 +81,7 @@ public void run() {
reader = new BufferedReader(new InputStreamReader(is));
String line;
int index = 0;
while ((line = reader.readLine()) != null) {
while ((line = BoundedLineReader.readLine(reader, 5_000_000)) != null) {
index++;
if (index == 1) {
// Skip the table title
Expand Down