SCAL-290924 add personalizedViewId parameter in LiveboardEmbedConfig#421
SCAL-290924 add personalizedViewId parameter in LiveboardEmbedConfig#421fathima-nooha merged 3 commits intomainfrom
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Summary of ChangesHello @fathima-nooha, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Liveboard embedding functionality by introducing a dedicated Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
commit: |
There was a problem hiding this comment.
Code Review
This pull request introduces a personalizedViewId parameter to the LiveboardEmbedConfig for loading specific personalized views and includes a bug fix for URL parameter placement. However, the changes introduce potential URL and Route injection vulnerabilities due to concatenating unvalidated and unencoded IDs directly into URL strings and paths. Specifically, getLiveboardUrl is vulnerable to parameter pollution via personalizedViewId, and getIframeSuffixSrc is vulnerable to route injection. Additionally, getLiveboardUrl has a bug where it doesn't correctly handle the legacy ?view= parameter in liveboardId or the precedence of personalizedViewId, which could lead to malformed URLs. It is recommended to use encodeURIComponent for query parameters, validate/sanitize IDs, and add more tests to cover these cases.
3de0f33 to
4a0e0a5
Compare
4a0e0a5 to
969e677
Compare
|
SonarQube Quality Gate
|








JIRA: https://thoughtspot.atlassian.net/browse/SCAL-290924
Earlier, when user had to open a specific personalized view in liveboard, it was passed along with liveboardId
eg:
liveboardId: "9bd202f5-d431-44bf-9a07-b4f7be372125?view=ae4f71bf-d8bc-4219-a15b-54fdec473efe",This loads correct personlised view, except when activeViewId is present.
With this PR, we add a new Parameter as below.
Expectation:
New view ID should be honoured
we can simply ignore, and new view ID should take precedence as it is a deliberate action from the developer to add the new view ID.
Old view ID should continue to be used like before
Bug fix - View param will now be correctly placed at end of URL (fixes issue with activeTabId)
Recording for fix: https://www.loom.com/share/1f654c767a134b339531ebc61b8be6cb