Skip to content

[pastebin] Link copied after creation opens folder view instead of pastebin content #628

Closed

Description

@streiman

Initial Checklist

Bug Description

When creating a pastebin, the app copies the raw public share link (linkShare.webUrl, e.g. https://<server>/s/<token>) to the clipboard. Opening that link shows the public folder view with manifest.json and the revisions/ folder instead of the pastebin content view.

The correct link that renders the pastebin content (with syntax highlighting) is https://<server>/pastebin/view/public/<token>. This URL is only generated by the "Copy public link" button in the pastebin view header, not after creation.

Reproduction Steps

  1. Install the Pastebin web app (v2.2.0)
  2. Open Pastebin → create a new pastebin with some content
  3. Click "Create Pastebin" – the copied link is the raw share URL
  4. Open the link in a private/incognito window
  5. Result: you see the folder structure (manifest.json, revisions/) instead of the pastebin content

Expected Outcome

The link copied after creation should open the pastebin content view (/pastebin/view/public/<token>), showing the files with syntax highlighting – same as the "Copy public link" button in the pastebin view.

Actual Outcome

The link opens the public folder view showing manifest.json and the revisions/ folder.

Additional Context

Root cause appears to be an inconsistency between two components:

  • src/Create.vue copies linkShare.webUrl directly to the clipboard:
    const clipboardText = linkShare.hasPassword
      ? `${linkShare.webUrl}\nPassword: ${password.value}`
      : linkShare.webUrl
    await copy(clipboardText)
  • src/View.vue correctly constructs the pastebin view URL:
    const token = link.webUrl.split('/').pop()
    shareUrl.value = urlJoin(configStore.serverUrl, 'pastebin', 'view', 'public', token)
    Suggested fix: in Create.vue, construct the same /pastebin/view/public/ URL (and append the password hint if a password is set) instead of copying the raw linkShare.webUrl.
    Environment
  • OpenCloud: 8.1.0 (rolling)
  • Pastebin app: 2.2.0
  • Browser: tested in Chrome/Firefox
    Workaround
    After creating a pastebin, open it from the pastebin list and use the "Copy public link" button in the header – this copies the correct /pastebin/view/public/ URL.

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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