Missing upper bound on events_count causes UInt16 overflow
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
Hướng nghiên cứu
Đọc bộ kiểm tra hợp lệ events_count trong packages/core/src/modules/ingest/ingest.constants.ts, sau đó kiểm tra cách trình xử lý replay truyền giá trị này trong packages/core/src/modules/ingest/ingest.service.ts và xem xét cột ClickHouse trong packages/db/src/code-migrations/10-add-session-replay.ts. Thêm các bài kiểm tra xác thực giới hạn cho 65,535 và 65,536; hoàn thành khi 65,535 được chấp nhận và các giá trị lớn hơn bị từ chối trước khi cơ sở dữ liệu phân tích cú pháp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
While going through the session replay ingestion flow, I noticed that events_count doesn't have an upper bound in zReplayPayload, even though the corresponding ClickHouse column is of type UInt16.
Unlike chunk_index, which already has a .max(65_535) check, events_count accepts integers beyond the database's supported range. The replay handler also forwards this value unchanged.
without .max(65_535)
with .max(65_535')
Steps to reproduce
I reproduced the overflow locally using ClickHouse 26.1.3:
SELECT events_count
FROM format(
JSONEachRow,
'events_count UInt16',
'{"events_count":65536}'
);
Actual result: 0
Expected behaviour: Values exceeding 65,535 should be rejected during request validation rather than silently wrapping around during database parsing.
A control query with 65535 returns the correct value.
Relevant files
packages/core/src/modules/ingest/ingest.constants.tspackages/core/src/modules/ingest/ingest.service.tspackages/db/src/code-migrations/10-add-session-replay.ts
Proposed fix
Add .max(65_535) to the events_count validator, consistent with chunk_index, along with boundary validation tests.
Are replay chunks exceeding 65,535 events intentionally supported? If not, I would be happy to submit a PR for this.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.3k
- Fork
- 552
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Openpanel-dev/openpanel
-
Bug: Saved reports lose their custom event selection after reloadCó thể đã có người làm @shiv-shi đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Openpanel-dev/openpanel#694 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Free trial banner overlaps the AI Chat sidebarCó thể đã có người làm @VasuS609 đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Openpanel-dev/openpanel#690 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Openpanel-dev/openpanel#653 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Openpanel-dev/openpanel#610 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Openpanel-dev/openpanel#697 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Openpanel-dev/openpanel
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ardia-browser/ardia#6391 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature:Actions/ConnectorTypes Team:ResponseOps
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
elastic/kibana#309028 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🔨 tool 🧰 library
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Orange-OpenSource/Orange-Boosted-Bootstrap#4035 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ajouter la page Plan du siteĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
DISIC/teleservice-conformite#230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
rothgar/rabble.radio#410 ·
Maintainer thường phản hồi trong vòng 1 ngày