lm-sys / lm-sys/FastChat

"Connection errored out" when inserting the code (or /etc/passwd)

Open
#3,707 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

The title itself is already pretty exhaustive.

As of today, I have this problem.
When I insert ANY code (length and programming language are NOT IMPORTANT) my message is NOT sent and I get a “Connection errored out” error.
You can check it yourself now.

Although, ok print(“Hello, World!”) goes fine.
But, for example, this code will 100% cause the error

```PostgreSQL
CREATE TABLE Shops (
shop_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
shop_name VARCHAR(100)
);

CREATE TABLE Units (
unit_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
unit_name VARCHAR(100),
shop_id INT,
FOREIGN KEY (shop_id) REFERENCES Shops(shop_id)
);

CREATE TABLE Mechanisms (
mechanism_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
mechanism_name VARCHAR(100),
unit_id INT,
FOREIGN KEY (unit_id) REFERENCES Units(unit_id)
);

CREATE TABLE EngineData (
record_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
mechanism_id INT,
voltage FLOAT,
temperature FLOAT,
speed FLOAT,
timestamp DATETIME,
FOREIGN KEY (mechanism_id) REFERENCES Mechanisms(mechanism_id)
);

CREATE TABLE RollingMillData (
record_id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
mechanism_id INT,
pressure FLOAT,
speed FLOAT,
timestamp DATETIME,
FOREIGN KEY (mechanism_id) REFERENCES Mechanisms(mechanism_id)
);
```

And also any mention of /etc/passwd will cause an error
- - - - - - -
The problem with /etc/passwd was there a long time ago and was fixed "with crutches" by simply inserting spaces before slashes
And the problem with code insertion NEVER existed and appeared only yesterday!!!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by sending the PostgreSQL snippet and a message containing /etc/passwd, then compare them with the example that succeeds. Trace where the connection error is generated and identify the input-specific behavior; done means valid code and the mentioned path no longer trigger the error while ordinary messages still send.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.