Repository navigation
Description
Initial Checklist
- I understand this is a bug report and questions should be posted in the Community Discussions
- I searched issues and couldn't find anything related (checked Pastebin 2.0.0 k.o #461, Truely "public" pastebins? (i.e. without passwords) #420, [pastebin] menu entry is showing on public pages #413 – all unrelated)
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
- Install the Pastebin web app (v2.2.0)
- Open Pastebin → create a new pastebin with some content
- Click "Create Pastebin" – the copied link is the raw share URL
- Open the link in a private/incognito window
- 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.vuecopieslinkShare.webUrldirectly 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