Skip to content

Commit

Permalink
codeql update 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mgtennant committed May 21, 2024
1 parent 8f66c60 commit 8175f78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/src/admin/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ 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}`
);
try {
await axios
.delete(
`${process.env.users_api_base_url}/integrations/${process.env.integration_id}/${process.env.css_environment}/users/${username}@idir/roles/${ticdiAdminRole}`,
{
headers: { Authorization: 'Bearer ' + bearerToken },
}
)
.delete(url.href, {
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) => {
return res;
})
Expand Down

0 comments on commit 8175f78

Please sign in to comment.