Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

If-Overwritten-Version header not enforced when accessed via TinyNode

オープン
#230 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
api, backend

調査の方向性

controllers/overwrite.js から始めて /overwrite リクエストの経路をたどり、その後、TinyNode の /overwrite 処理および関連する TinyNode issue 106 と比較してください。If-Overwritten-Version が RERUM サーバーに到達するか、また値が一致しない場合に 200 OK ではなく 409 Conflict が返されるかを確認してください。文書化された optimistic-locking の動作が適用されているか、統合/設定のギャップが明確に特定されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

  1. Load an object via store.rerum.io/v1/id/{id} - note __rerum.isOverwritten (e.g., 2025-11-30T20:31:57.853)
  2. Send /overwrite to tiny.rerum.io - this updates isOverwritten to new value
  3. Send another /overwrite to tiny.rerum.io with header If-Overwritten-Version: 2025-11-30T20:31:57.853 (old value)
  4. Expected: 409 Conflict
  5. Actual: 200 OK, silent overwrite

Questions

  1. Does TinyNode pass through the If-Overwritten-Version header to RERUM?
  2. Is the optimistic locking check implemented in TinyNode or expected to be handled by RERUM?
  3. Is there a configuration needed to enable this feature?

Related

主要言語
JavaScript
スター
3
フォーク
6
平均マージ
4日 9時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CenterForDigitalHumanities/rerum_server_nodejs のほかの issue

CenterForDigitalHumanities/rerum_server_nodejs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。