[BUG] Cosmos P2: ORDER BY continuation predicates incorrectly escape strings
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/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ệ
- azure, java
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
Start in OrderByDocumentQueryExecutionContext.java:444-447 and inspect how ORDER BY continuation predicates escape string values. First trace the helper's callers and related tests, then run the focused Cosmos query tests. Done means quotes, backslashes, and control characters produce valid predicates and resumed results match uninterrupted queries.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Alan Zimmer's November 6, 2026 audit of com.azure:azure-cosmos:4.84.0-beta.1 reports that Java regex replacement processing consumes the intended escape backslash when constructing ORDER BY continuation predicates. A stored value a"b becomes the malformed SQL literal "a"b" in a resumed query. Backslashes and control characters are also unhandled and can change comparison values. Reported priority: P2.
Exception or Stack Trace
No SDK/service stack trace supplied. The reported helper output contains a malformed SQL string literal.
To Reproduce
Construct an ORDER BY continuation predicate for a stored value containing a quote, such as a"b. Also cover backslashes and control characters. Compare uninterrupted and resumed query execution and verify that continuation predicates preserve the original comparison values.
Code Snippet
No complete executable snippet supplied. Reported location: OrderByDocumentQueryExecutionContext.java:444-447 in the audited source. The exact helper reportedly emitted "a"b" for input a"b in a standalone JDK probe.
Expected behavior
String comparison values are correctly serialized or parameterized in continuation predicates. Resumed queries are valid and return results equivalent to uninterrupted queries for quotes, backslashes, and control characters.
Screenshots
N/A.
Setup (please complete the following information):
- OS: Not reported.
- IDE: Not reported.
- Library/Libraries:
com.azure:azure-cosmos:4.84.0-beta.1. - Java version: JDK probe; exact version not supplied.
- App Server/Environment: ORDER BY query continuation.
- Frameworks: Not reported.
Dependency mismatch: Not indicated; dependency tree/logs were not supplied.
Additional context
Proposed fix from the audit: use proper JSON string serialization or SQL parameters instead of ad hoc regex escaping.
Regression coverage: compare uninterrupted and resumed queries with string values containing quotes, backslashes, and control characters; assert valid predicates and identical comparison values/results.
Evidence: Alan reproduced the exact helper's malformed output at the standalone JDK-helper level, not through live query execution. No live Cosmos calls or full SDK test suite were run, and no repository files were changed. This issue tracks validation and implementation of the proposed fix, not an already-applied fix.
Information Checklist
- Bug Description Added
- Repro Steps Added
- Setup information Added
- Ngôn ngữ chính
- Java
- Star
- 2.6k
- Fork
- 2.2k
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 257
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọ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 Azure/azure-sdk-for-java
-
[Spring Cloud Azure] Improve Javadoc and startup guidance for allowed-group-names vs allowed-group-ids in AadAuthenticationPropertiesCó thể đã có người làm @himanchalkaushale đã nhận 7 ngày trước. Đang mởazure-spring azure-spring-aad Client
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-sdk-for-java#51046 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mgmt, in track 1 migration guide, call out that file-based authentication method is not recommendedCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởAzure.Identity
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
Azure/azure-sdk-for-java#48894 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] DataLakeFileSystemAsyncClient.createIfNotExists returns true when the file system already existsCó thể đã có người làm @browndav-msft đã nhận hôm nay. Đang mởClient customer-reported needs-team-attention question Storage
Azure/azure-sdk-for-java#51145 · 2 bình luận · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] RequestRetryOptions tryTimeout has no effect on synchronous Storage clientsCó thể đã có người làm @browndav-msft đã nhận hôm nay. Đang mởClient customer-reported needs-team-attention question Service Attention Storage
Azure/azure-sdk-for-java#51144 · 2 bình luận · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Client Cosmos
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Azure/azure-sdk-for-java#51133 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/azure-sdk-for-java
Issue tương tự
-
Keyboard crashes Chrome tabsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Julow/Unexpected-Keyboard#1490 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Vakore/ZappierGames#275 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
unitycatalog/unitycatalog#2148 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement priority: low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Riptide-Labs/riptide#1060 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug key bindings source editor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày