nodeSolidServer / nodeSolidServer/node-solid-server

Support the `If-None-Match` header

Open
#1,431 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Expected behaviour

  • POST a resource to an IRI where a resource already exists, with the If-None-Match header set.
  • The server returns 412, and the original resource is unchanged.

Actual behaviour

  • POST a resource to an IRI where a resource already exists, with the If-None-Match header set.
  • The server returns 201 Created, and the original resource is overwritten.

Additional context

When receiving a resource creation request (i.e. POST or PUT, possibly PATCH?), if the If-None-Match header is set, the server should perform a check to ensure that no resource is already stored at the target IRI.

In the case of POST, since the Slug header is meant to be a hint and not a hard constraint, I'm not sure what the behaviour should be, but when PUTting a resource to an IRI where a resource already exists, an If-None-Match request should fail with 412.

Open question

When only having write (but not read) access to a container, can this be used to exfiltrate information one should not be allowed to access ?

Contributor guide

Open the contributing guide

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

No files, tests, or entry points are named. Start by locating the server's POST and PUT request handling and its conditional-header processing, then review the existing behavior around If-None-Match. Done means the requested 412/no-overwrite behavior is covered, with the POST/Slug and write-only access questions resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.