Skip to content

[BUG][UPDATED TITLE] When a share URL is truncated/corrupted, the app silently falls back to the demo plan #142

Closed

Description

@uqarni

My engineer clicked on the URL I shared with him in Whatsapp, but Whasapp dropped the last few characters of the link.
And it pointed him to someone else's plan that was totally unrelated to ours.

This should not be possible if properly implemented.

Activity

  1. backnotprop commented on Feb 11, 2026

    @backnotprop
    Owner

    A link would be helpful, otherwise this really isn't possible. That site is a static site, it's just hosted through CloudFront. There's no storage of plans.

    Maybe there was an error reading the base64 from your URL, and therefore it showed the default demo plan: https://share.plannotator.ai/

    If you load that site by itself, there's a default/hardcoded plan that is used for demos.

  2. backnotprop commented on Feb 11, 2026

    @backnotprop
    Owner

    Investigation Report

    Investigated the full sharing stack — encoding pipeline, static site deployment, and truncation behavior.

    Architecture (no server-side storage)

    • share.plannotator.ai is a pure static site (S3 + CloudFront). No backend, no database, no plan storage.
    • The entire plan + annotations are compressed into the URL hash fragment using deflate-raw + base64url encoding (packages/ui/utils/sharing.ts).
    • On load, the app reads window.location.hash, decompresses it client-side, and renders the plan. Nothing is sent to or retrieved from any server.

    What happened with the truncated URL

    When WhatsApp drops the last few characters of the share link, the truncated hash fails to decompress (deflate streams are not tolerant of truncation). The app's error handling path:

    1. parseShareHash() catches the DecompressionStream error → returns null
    2. isSharedSession stays false
    3. App tries fetch('/api/plan') — static site returns 404
    4. Falls back to the hardcoded demo plan (PLAN_CONTENT in packages/editor/App.tsx:37-328)

    The "unrelated plan" your engineer saw was the built-in demo plan — "Implementation Plan: Real-time Collaboration" with WebSockets, operational transforms, etc. It's the same content anyone sees at https://share.plannotator.ai/ with no hash.

    Conclusion

    Not a security vulnerability — no one can see another user's plan. Plans exist only in the URL itself and are never stored server-side.

    It is a UX bug — when a share URL is truncated/corrupted, the app silently falls back to the demo plan instead of showing an error message. This reasonably led to the assumption that another user's plan was being displayed.

    Recommendation

    Show an error state when a hash is present but fails to decompress, e.g. "This share link appears to be incomplete or corrupted. Ask the sender to re-share the full URL."


    🤖 Generated with Claude Code

  3. changed the title [-]Major Security Vulnerability: share.plannonator.ai URLs can be easily changed to point to other people's plans[/-] [+][BUG][UPDATED TITLE] When a share URL is truncated/corrupted, the app silently falls back to the demo plan[/+] on Feb 11, 2026
  4. backnotprop commented on Feb 11, 2026

    @backnotprop
    Owner

    @uqarni ive changed the title to avoid scaring others... let me know if you disagree

  5. backnotprop commented on Feb 12, 2026

    @backnotprop
    Owner

    Tangentially related: PR #146 adds the ability to self-host the share portal via PLANNOTATOR_SHARE_URL. For anyone with formal security concerns about share links pointing to an external domain, you can now host the portal on your own infrastructure and have all generated links point there.

    To be clear (as noted in the original investigation above): the hosted portal at share.plannotator.ai is a static SPA with no backend — plan data is never stored or transmitted anywhere. It lives entirely in the URL hash and is decoded client-side. But for environments where even pointing at an external domain is a policy concern, self-hosting is now an option.

  6. uqarni commented on Feb 12, 2026

    @uqarni
    Author
  7. backnotprop commented on Jun 13, 2026

    @backnotprop
    Owner

    Closing as resolved in the current sharing flow. Plannotator now treats failed shared-link loading as an error state and warns that the visible content is demo content, rather than silently presenting the demo as if it came from the shared link. Short-link support also reduces the risk of messenger link truncation. If a current shared link can still silently fall back to demo content with no error, please reopen with the URL shape and browser details.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions