Check write permissions and validation

Use the complete shared-note example on a disposable test host. These checks concern its anonymous policy and plain paragraph target; they do not establish private-user authorization or every application operation.

Keep the two connections separate

Use the WebDAV connection to install and inspect the fixture. Send the test writes to the public application URL without the authoring token. A successful authoring upload cannot prove that an application grant or validator worked.

In a terminal with curl (use curl.exe in Windows PowerShell), replace the URL below with your test site's public URL. The commands use shell line continuations; in PowerShell put each command on one line.

curl -i -X PUT 'https://YOUR-SITE.onpagelove.com/shared-note/notes.html' \
  -H 'Content-Type: text/html' -H 'Range: selector=#shopping-note' \
  --data '<p id="shopping-note">Permission check</p>'

Run negative and positive controls

  1. Before installing policy.html, create the note through authoring and run the request above. On the isolated test host it was refused (401 or 403), and the stored paragraph remained unchanged. An unrelated existing grant can invalidate this control; use a clean test scope and inspect the actual result.
  2. Install the supplied policy and repeat the valid paragraph request. The checked fixture returned 206; read the stored source through WebDAV and confirm the paragraph changed. A status without readback is incomplete evidence.
  3. Repeat with each invalid body below, one at a time. Each checked request returned 422, and the prior accepted paragraph stayed in storage.
Invalid body What this checks
<p id="shopping-note"><img src="about:blank"></p> A disallowed child element
<p id="shopping-note" onclick="void 0">Text</p> An extra attribute
<p id="different">Text</p> The wrong target identity
<p id="shopping-note">One</p><p id="shopping-note">Two</p> Duplicate target paragraphs
  1. Test a whole-document PUT by omitting Range, and a POST to the paragraph by changing the method. The example grants neither; both were refused in the check. Do not widen the policy to make these probes succeed.
  2. Finish with a valid request and readback again. This distinguishes selective refusal from an unavailable or wholly broken service.

Check concurrency separately

GET the paragraph using Range: selector=#shopping-note and save its ETag. Submit PUT with that exact tag in If-Match. After another accepted write changes the paragraph, retry a different body with the old tag: the tested result was 412, leaving the newer content intact. The shared-note tutorial exercises this in the browser and retains the losing draft for comparison.

These deliberately unconditional validation probes belong on an isolated fixture. Normal editing should use the conditional save flow. A shape controls permitted structure; it is not a general HTML sanitizer, text-length rule, or proof of safe URL values. For your own application, add independent tests for each grant, identity, operation, value rule, and relevant side effect.

Record the endpoint role, actor, operation, selector, submitted body, response, stored readback, and cleanup. Keep credentials out of the record. Use verification and versions to qualify the result.