Skip to content

Discard stale application-page child responses after navigation #491

Done

Description

@samuelmbabhazi

Problem and impact

The application page protects its initial application request with loadRevision, but several child requests do not use that revision: secret metadata, release history and environment information. A late response from a previously viewed application/environment can overwrite the state of the current page.

An operator can therefore see application B with application A's releases or environment A's metadata. This is a UI state-consistency defect. The probe did not demonstrate a server-side permission bypass, a mutation of an unauthorized application or disclosure of secret values.

Priority: P2, from the 2026-11-25 architecture audit of main 1295e534d7a1c3cd0a492449de8806aa532a4924. Related UI work: #25. This affects the existing page; the logs/terminal extraction in #468 does not change these loading methods.

Evidence and reproduction

  • Application loading increments loadRevision and checks it after the application request.
  • Child requests update secret metadata and environment information without checking that revision, including their rejection handlers.
  • Release loading similarly updates the release list without validating the request's application context.
  • The metrics loader already uses explicit stale/latest-request guards and demonstrates a suitable local pattern.

A bounded test extracted and transpiled the exact current load and loadReleases methods, with deferred promises as collaborators:

  1. Complete the main load for application A in environment A, leaving its child requests pending.
  2. Complete the main load for application B in environment B and resolve B's child requests.
  3. Resolve A's child requests last.
  4. Observe application.id === app-B, while the secret metadata, releases and environment information are those of A.

This reproduces the method-level race without modifying repository files. It is not a full Angular routing/browser test. The metadata in the probe was synthetic; no real secret values were read.

Proposed correction

Give every application-page request a shared context/generation identity. Ignore late success and failure responses after a context change or destruction, and clear context-specific data when moving between resources. Cancellation may reduce wasted work, but correctness must not depend on cancellation being honored by the transport.

Acceptance criteria

  • Deferred responses from A cannot replace B's releases, secret metadata or environment information after navigation.
  • Late rejections from A cannot clear B's successfully loaded data or set B's error state.
  • Destruction invalidates every outstanding child request.
  • A context change clears or explicitly marks old data until the new context's data is available.
  • Tests cover A-to-B navigation with reversed completion order, failures, repeated release refreshes and destruction.
  • A browser/component integration test verifies the behavior through reused application-page routing.

Publication check: main advanced to 2ee78ff1e96118b1732b98bc54c99f5f91b95a32 through #469, which changes only an exec-session test. The production paths above are unchanged.

Activity

  1. added
    bug
    priority:P2
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P2track:web

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions