MattHeard / Dendrite

Write an interactive adventure story with the rest of the world
MIT License
2 stars 0 forks source link

Story option links should not be overridable. #63

Closed MattHeard closed 10 years ago

MattHeard commented 10 years ago

Use case 1

  1. Alice writes the first page of a new story and creates a single option labeled "Continue?". When the page is created, it is assigned the page ID 1a. The option labeled "Continue?" has a link target of /write.jsp?from=1a&linkIndex=0.
  2. Alice clicks on the link "Continue?" and writes the second page of her story. The new page is assigned the page ID 2a. The link target of "Continue?" on page 1a is changed from /write.jsp?from=1a&linkIndex=0 to /read.jsp?p=2.
  3. Bob visits page 1a and sees the option "Continue?" with the link target /read.jsp?p=2. Bob is looking to break Dendrite, and he knows that each connected link has the form /read.jsp?p=<pageNumber> and each unconnected link has the form /write.jsp?from=<pageId>&linkIndex=<index>.
  4. Bob types into the URL bar of his browser /write.jsp?from=1a&linkIndex=0.
  5. The page checks to confirm that the link has not been connected but notices that it has been connected to page 2. Because this link is no longer writable, Bob is redirected to /rewrite.jsp?p=2.
  6. Bob writes a new page and submits it, and it is created as 2b. Both versions are now possibly served if someone clicks "Continue?" on page 1a.