Skip to content
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

fix: [M3-8424] - Fix CodeQL alerts for DOM text reinterpreted as HTML #11008

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-11008-fixed-1727297819528.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Fix CodeQL alerts for DOM text reinterpreted as HTML ([#11008](https://github.com/linode/manager/pull/11008))
4 changes: 3 additions & 1 deletion packages/manager/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export const genOAuthEndpoint = (

const query = {
client_id: clientID,
redirect_uri: `${APP_ROOT}/oauth/callback?returnTo=${redirectUri}`,
redirect_uri: `${APP_ROOT}/oauth/callback?returnTo=${encodeURIComponent(
redirectUri
)}`,
response_type: 'token',
scope,
state: nonce,
Expand Down
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the vulnerability detected in this file a false alarm?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes didn't really make sense to include as part of the PR because they didn't see to accomplish anything different than the existing code, so I removed them. The change made in the sessions.ts file actually made sense and I decided to leave it.

Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { LOGIN_ROOT } from 'src/constants';
import { RevokeTokenSuccess, revokeToken } from 'src/session';
import { ThunkActionCreator } from 'src/store/types';
import { revokeToken } from 'src/session';
import { getEnvLocalStorageOverrides } from 'src/utilities/storage';

import { handleLogout as _handleLogout } from './authentication.actions';

import type { RevokeTokenSuccess } from 'src/session';
import type { ThunkActionCreator } from 'src/store/types';

/**
* Revokes auth token used to make HTTP requests
*
Expand Down
Loading