-
Notifications
You must be signed in to change notification settings - Fork 271
fix: BED-6546 URL encode cypher queries #1962
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
Conversation
WalkthroughThe Cypher "View in Explore" link now URL-encodes the base64 Cypher query using encodeURIComponent. Tests were updated to assert percent-encoded output, including handling of padding (==) and plus-like characters from inputs (e.g., hello>world). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant C as Cypher View
participant E as Explore Page
U->>C: Click "View in Explore"
C->>C: encodeCypherQuery(query)
C->>C: encodeURIComponent(base64Query)
C-->>U: Navigates to /explore?cypherSearch=<encoded>
U->>E: HTTP GET with cypherSearch
E-->>U: Render Explore with provided query
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-09-08T19:01:53.112ZApplied to files:
🧬 Code graph analysis (2)packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Cypher/Cypher.tsx (1)
packages/javascript/bh-shared-ui/src/views/PrivilegeZones/Cypher/Cypher.test.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mistahj67
left a comment
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.
Tested locally 🚀
Description
Certain cypher queries were breaking when going from the selector overview page to the
View in Explorepage. This is because the base64 encoded queries were not being encoded as URI components, so certain base64 characters like+were being put into the URL as spaces, which broke decoding on the explore page.Motivation and Context
Resolves BED-6546
The cypher query mentioned in the ticket was breaking when viewed on the explore page -- these changes fix that issue.
Added
encodeURIComponentto the cypher query before creating the URL for the explore page.How Has This Been Tested?
The cypher query listed in the ticket (not duplicated here for confidentiality reasons) no longer breaks when viewed in the explore page.
Existing queries still function as expected.
Screenshots (optional):
Types of changes
Checklist:
Summary by CodeRabbit
Bug Fixes
Tests