Repository navigation
fix(solid): publish the draft as its checks read it - #668
Merged
Merged
Conversation
Publishing checked a draft on one read and then assembled the release from its documents read again, accepting the second read when each document's ETag was the same. A server may give no ETag, or the same one for other content, so a release could be written from content the release rules, the Markdown check and the shapes never saw, and the draft then marked released from that read too. assemble now makes the release from the read at the version it is given, as the repository holds it, without reading again, and refuses with changedElsewhere when that read is no longer the draft's last. A version now names the read itself: a document read again is a new read unless the pod answers 304, so a draft read anew in between is never taken for the one checked, whatever its ETags say. Refs: GHSA-438x-f779-7chm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Publishing checked a draft on one read and then assembled the release
from its documents read again, accepting the second read when each
document's ETag was unchanged. A server may send no ETag, or the same
one for other content, so a release could be written from content the
release rules, the Markdown check and the shapes never saw, and the
draft then marked released from that read too.
assemblenow builds the release from the read at the version it isgiven, as the repository holds it, without reading again, and refuses
with changedElsewhere when that read is no longer the draft's last. A
version now names the read itself rather than the server's ETags: a
document read again is a new read unless the pod answers 304. Download
still assembles from a fresh read, since it runs no checks.
On a pod that sends no ETag, a re-read of the draft during a publish
(for example a refetch when the tab regains focus) now refuses that
publish with changedElsewhere; publishing again succeeds. docs/studio.md
and docs/data-model.md describe the rule.
Refs: GHSA-438x-f779-7chm