If-Overwritten-Version header not enforced when accessed via TinyNode
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
Hướng nghiên cứu
Bắt đầu với controllers/overwrite.js và lần theo đường đi của request /overwrite, sau đó so sánh với cách TinyNode xử lý /overwrite và issue 106 liên quan của TinyNode. Xác minh xem If-Overwritten-Version có đến được máy chủ RERUM hay không và các giá trị không khớp có tạo ra 409 Conflict thay vì 200 OK hay không. Được xem là hoàn tất khi hành vi optimistic-locking được ghi nhận trong tài liệu được thực thi hoặc khi khoảng trống trong tích hợp/cấu hình được xác định rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The If-Overwritten-Version header for optimistic locking is documented in the RERUM API but does not appear to be enforced when /overwrite requests come through TinyNode (tiny.rerum.io).
Background
According to the RERUM API documentation and the server code in controllers/overwrite.js, the If-Overwritten-Version header should be checked against __rerum.isOverwritten to detect concurrent edit conflicts.
The server code shows this logic:
const expectedVersion = req.get('If-Overwritten-Version') ?? req.body.__rerum?.isOverwritten
const currentVersionTS = originalObject.__rerum?.isOverwritten ?? ""
if (expectedVersion !== undefined && expectedVersion !== currentVersionTS) {
// Should return 409 Conflict
}
The Problem
When accessing RERUM through TinyNode (tiny.rerum.io/overwrite), the If-Overwritten-Version header is sent correctly but the version check is not enforced - requests succeed even with version mismatches.
Steps to Reproduce
- Load an object via
store.rerum.io/v1/id/{id}- note__rerum.isOverwritten(e.g.,2025-11-30T20:31:57.853) - Send
/overwritetotiny.rerum.io- this updatesisOverwrittento new value - Send another
/overwritetotiny.rerum.iowith headerIf-Overwritten-Version: 2025-11-30T20:31:57.853(old value) - Expected: 409 Conflict
- Actual: 200 OK, silent overwrite
Questions
- Does TinyNode pass through the
If-Overwritten-Versionheader to RERUM? - Is the optimistic locking check implemented in TinyNode or expected to be handled by RERUM?
- Is there a configuration needed to enable this feature?
Related
- TinyNode issue: https://github.com/CenterForDigitalHumanities/TinyNode/issues/106
- RERUM API docs: https://store.rerum.io/v1/API.html#overwrite
- Ngôn ngữ chính
- JavaScript
- Star
- 3
- Fork
- 6
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
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 CenterForDigitalHumanities/rerum_server_nodejs
-
bug documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
backend dependencies easy
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CenterForDigitalHumanities/rerum_server_nodejs#290 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
Tất cả issue của CenterForDigitalHumanities/rerum_server_nodejs
Issue tương tự
-
feature task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
RealDevSquad/website-www#1178 ·
-
add latest sol modelĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
netlify-labs/nax#56 · 2 bình luận · 1 reaction ·
-
accessibility bug revealjs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
quarto-dev/quarto-cli#14961 ·
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 88/100
PnX-SI/GeoNature#4435 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openlayers/openlayers#17648 ·
Maintainer thường phản hồi trong vòng 1 ngày