Skip to content

[Bug] Alias-chain integrity: app-level cycle/target validation; destinationType unused #128

@Salem874

Description

@Salem874

Problem

The alias chain (tblShortURLs.redirectAlias) has no FK and no true cycle detection — it relies solely on the 3-hop counter in sp_lookupShortURL. destinationType is never read by the resolver.

Fix

Add app-level cycle/target-exists validation on alias create/edit; make destinationType authoritative in the resolver or drop it.

Acceptance criteria

  • Cannot save an alias that targets a non-existent code or forms a cycle.
  • destinationType is either used or removed.

From the 2026-06-04 schema review — see docs/SCHEMA_REVIEW_2026-06-04.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponent-BComponent B: Shortlink Domain (g2my.link)priority-mediumMedium priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions