Skip to content

Cover the installer's connection check, the import, and two link paths - #723

Merged
blaipr merged 2 commits into
mainfrom
test/install-check-and-link-refusals
Aug 13, 2026
Merged

Cover the installer's connection check, the import, and two link paths#723
blaipr merged 2 commits into
mainfrom
test/install-check-and-link-refusals

Conversation

@blaipr

@blaipr blaipr commented Aug 13, 2026

Copy link
Copy Markdown
Member

What

Tests across five controllers, salvaged and finished from an agent run that stopped part-way.

The installer's connection check

The first thing anybody runs, and the only feedback they get about credentials that do not work:

  • an empty host and a unix socket path that is not there are each reported;
  • a database that cannot be reached is reported as an error the wizard can display;
  • once the attempt limit is hit, the refusal comes before any connection is tried.

The throttle writes to a real directory, keyed on random bytes rather than faker — the harness seeds faker, so two tests in the same class drew the same name and the second mkdir warned.

The import, and two save controllers

What the import refuses and what it reports when the import itself fails part-way; the account-configuration and custom-field-create refusals.

Two public link paths

  • A valid link renders its password as an image when the instance is configured that way.
  • The audit event a valid link records has its viewer address masked on a demo instance.

One thing pinned deliberately rather than approvingly

A hash that was never issued answers with the bare string Link not found, while a real but expired link answers with the permission-denied page — the exception for an unknown hash escapes to the generic handler, which renders it through the action's plain-text type. So the two are distinguishable from outside, on a page reachable without signing in.

Public link hashes are long random strings, so this is an oracle nobody can practically walk — it tells an attacker who already holds a hash that it was once real. It is written down in the test rather than left to be rediscovered, and it is worth a decision separately from this PR.

Testing

Integration: 30 green across the four classes. Unit: 2 green on the custom-field controller.

blaipr added 2 commits August 13, 2026 21:57
The installer's check is the first thing anybody runs and the only feedback they
get about credentials that do not work. Covered: what it says for a host that is
empty, a socket path that is not there, a database that cannot be reached, and
what happens once the attempt limit is hit — the refusal comes before any
connection is tried.

The import: what it refuses, and what it reports when the import itself fails.
The account configuration and the custom field create: their own refusals.

For public links, two paths that had nothing on them: a link that renders its
password as an image when the instance is configured that way, and the audit
event a valid link records, whose viewer address is masked on a demo instance.

One thing this pins deliberately rather than approvingly: a hash that was never
issued answers with the bare string 'Link not found' while a real but expired
link answers with the permission-denied page, so the two are distinguishable
from outside. The hashes are long random strings, so it is an oracle nobody can
walk, but it is written down rather than left to be rediscovered.

The throttle directory is keyed on random bytes rather than faker, which the
harness seeds — two tests in a class drew the same name and the second mkdir
warned.
The two tests that connect to a real server named the host 'db', which is what
it is called inside the development compose network and nothing at all on CI —
where they failed on name resolution rather than on what they were testing.

Read the same environment the rest of the suite reads.
@blaipr
blaipr merged commit 3283b7b into main Aug 13, 2026
8 checks passed
@blaipr
blaipr deleted the test/install-check-and-link-refusals branch August 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant