-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add button to copy the item URL #389
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request modifies the Changes
Suggested reviewers
Security Recommendations
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.
Actionable comments posted: 1
🛑 Comments failed to post (1)
frontend/pages/item/[id]/index.vue (1)
389-391:
⚠️ Potential issueConsider implementing URL sanitization for security
The direct use of
window.location.href
could potentially expose sensitive information in URL parameters. Consider implementing URL sanitization before copying.Here's a suggested implementation:
const currentUrl = computed(() => { - return window.location.href; + const url = new URL(window.location.href); + // Remove sensitive parameters if any + url.searchParams.delete('token'); + url.searchParams.delete('session'); + return url.toString(); });Committable suggestion skipped: line range outside the PR's diff.
5d593c6
to
fcba843
Compare
What type of PR is this?
What this PR does / why we need it:
It can be useful to be able to copy an item's URL (especially from the PWA on mobile devices, where the URL bar is not visible).
Which issue(s) this PR fixes:
No issues.
Special notes for your reviewer:
-
Testing
Enter the item page for an asset and click the copy button next to the QR code generation.
Summary by CodeRabbit
New Features
Style