-
Notifications
You must be signed in to change notification settings - Fork 111
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
Develop #624
Develop #624
Conversation
…cal' and slightly modifying install.sh script
…t request, adding ENV variable to env example to ensure that lack of the variable doesn't break the app
Firecrawl use fetch
@@ -37,6 +40,12 @@ | |||
const [deletingMap, setDeletingMap] = useState({}); | |||
const [confirmClose, setConfirmClose] = useState(false); | |||
|
|||
const goToDatasourcePage = (id: string) => { | |||
if (isAirbyteEnabled) { | |||
router.push(`/${resourceSlug}/datasource/${id}`); |
Check warning
Code scanning / CodeQL
Client-side URL redirect Medium
user-provided value
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 3 days ago
To fix the problem, we should avoid using user input directly in constructing the redirect URL. Instead, we can maintain a list of authorized redirects and choose from that list based on the user input. This ensures that only valid and safe URLs are used for redirection.
- Create a list of authorized
resourceSlug
values. - Check if the
resourceSlug
fromrouter.query
is in the list of authorized values. - Only perform the redirection if the
resourceSlug
is authorized.
-
Copy modified line R43 -
Copy modified line R45 -
Copy modified lines R47-R48
@@ -42,5 +42,8 @@ | ||
|
||
const authorizedResourceSlugs = ['validSlug1', 'validSlug2']; // Add all authorized slugs here | ||
const goToDatasourcePage = (id: string) => { | ||
if (isAirbyteEnabled) { | ||
if (isAirbyteEnabled && authorizedResourceSlugs.includes(resourceSlug)) { | ||
router.push(`/${resourceSlug}/datasource/${id}`); | ||
} else { | ||
toast.error('Unauthorized resource slug'); | ||
} |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 64d54c0 |
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.
This is a big merge... each component has been individually tested. Code LGTM
No description provided.