-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Nc fix/custom url follow up #10180
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
Nc fix/custom url follow up #10180
Conversation
📝 WalkthroughWalkthroughThe pull request introduces several changes across different components and files in the NocoDB project. A new Changes
Suggested Labels
Suggested Reviewers
Sequence DiagramsequenceDiagram
participant User
participant Middleware
participant Router
User->>Middleware: Request with query params
Middleware->>Middleware: Parse hash-redirect and hash-query-params
Middleware->>Router: Construct new URL
Router->>User: Redirect to new URL
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/nc-gui/components/general/PageDoesNotExist.vue (1)
1-16: Consider usage of SSR & route navigation.Since this is a Nuxt/Vue component, ensure that calling
navigateTo('/')directly from the button click meets your routing requirements. In SSR scenarios, or if the page is loaded server-side, referencing global browser objects or certain runtime methods might cause unexpected behavior. If this component is strictly client-side, then this approach is fine. Otherwise, you may consider a Nuxt-provided navigation API or an<nuxt-link>for safer, more consistent routing.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/nc-gui/lang/en.jsonis excluded by!**/*.json
📒 Files selected for processing (4)
packages/nc-gui/components/dlg/ViewCreate.vue(0 hunks)packages/nc-gui/components/general/PageDoesNotExist.vue(1 hunks)packages/nc-gui/middleware/01.redirect.global.ts(1 hunks)packages/nocodb/src/models/CustomUrl.ts(1 hunks)
💤 Files with no reviewable changes (1)
- packages/nc-gui/components/dlg/ViewCreate.vue
🔇 Additional comments (1)
packages/nc-gui/middleware/01.redirect.global.ts (1)
1-29:⚠️ Potential issueVerify SSR safety & sanitized URL usage.
SSR caution: Using
window.locationwithin a Nuxt route middleware can fail when executed in a server-side context. If you plan to run this middleware server-side, consider checkingprocess.clientbefore accessingwindowor refactor to a purely client-side guard.Potential XSS/URL validation: The user-supplied
hash-redirectandhash-query-paramsare decoded and redirected without validation. Attackers could inject malicious fragments that lead to phishing or an untrusted domain. At minimum, ensure that the domain is restricted or sanitized to avoid unsafe redirects.Would you like me to generate a script to search for references to
01.redirect.global.tsin the codebase, verifying SSR usage or potential sanitization steps?
|
Uffizzi Preview |
Change Summary
Provide summary of changes with issue number if any.
Change type
Test/ Verification
Provide summary of changes.
Additional information / screenshots (optional)
Anything for maintainers to be made aware of