Skip to content

Latchkey 0.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 13:10
· 6 commits to main since this release
c7d4ac4

The join page gets its own switches, can live on a host or under a path, and invites become links and tickets (D187).

Changes

  • Three switches. landing.enabled turns the page on. invites.enabled lets players use invite codes, and sessions.enabled lets them sign a browser in. Each is off until set, and the page only offers what's on. With invites off, admins can't make invites, so no code goes out that can't work. With sign-in off, a used invite still puts the player on the whitelist but signs no browser in, and /signin gives no link.
  • A join page on its own host, or under a path. landing.public-url can be https://join.example.org or https://example.org/join, with up to three lowercase path parts. Under a path, Latchkey answers only that path, and its cookies stay on it.
  • Invite links. An invite link carries the code after #, so it never reaches a web log. Opening it fills the code in, and the player still presses Continue. In game, invite create now also shows the admin that link.
  • Tickets for Leaf Juice. While invites can be used, invite create --json adds a ticket with server, join, link (join + #{code}) and expires. The code stays in the once/ file as before, so the console never sees it.
  • The map is unchanged. It still goes through Mapkeeper's hand-off.

Upgrading

Replace the jar. Invites and sign-in are off after the upgrade until you add enabled: true under invites: and sessions: in plugins/Latchkey/config.yml, then run /latchkey reload. /latchkey status names each one that's off.

To move the page to a join host:

  1. Point the new name at Latchkey in your proxy.
  2. Set landing.public-url to the new address.
  3. Reload.

Tested

264 unit and HTTP tests pass, 24 of them new:

  • each switch on its own, off by default, and that a switch can't open a part another check stops;
  • the page under a path, including a whole invite under /join and its cookie path;
  • the code-from-link script, allowed by hash;
  • the ticket in the JSON answer, never carrying the code.

Not tried yet: a real proxy at a join host or a path, a real browser opening an invite link, or Leaf Juice printing a ticket.