Skip to content

Commit

Permalink
codeql 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mgtennant committed May 21, 2024
1 parent 8175f78 commit 7c363e7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/src/admin/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,10 @@ export class AdminService {
async removeAdmin(username: string): Promise<{ error: string | null }> {
const ticdiAdminRole = 'ticdi_admin';
const bearerToken = await this.getToken();
const url = new URL(
`${process.env.users_api_base_url}/integrations/${process.env.integration_id}/${process.env.css_environment}/users/${username}@idir/roles/${ticdiAdminRole}`
);
const url = `${process.env.users_api_base_url}/integrations/${process.env.integration_id}/${process.env.css_environment}/users/${username}@idir/roles/${ticdiAdminRole}`;
try {
await axios
.delete(url.href, {
.delete(url, {
headers: { Authorization: 'Bearer ' + bearerToken },
})

Check failure

Code scanning / CodeQL

Server-side request forgery Critical

The
URL
of this request depends on a
user-provided value
.
.then((res) => {
Expand Down

0 comments on commit 7c363e7

Please sign in to comment.