DependencyTrack / DependencyTrack/frontend

Maximum call stack size exceeded during OIDC Login (Azure Entra ID)

Open
#1,312 2 comments 0 reactions 0 assignees View on GitHub
defect in triage
Dominant language
Vue
Stars
171
Forks
250
Avg merge
10h 56m
Merged PRs (30d)
84

Description

### Current Behavior

We are deploying Dependency Track via Helm. The application has been set up so that the front end is accessible. The app registration is configured as a single-page application (SPA) with a configured redirect URI. When attempting to log in via OpenID Connect, the front-end console displays the following error:
'Maximum call stack size exceeded.'

However, the pod logs indicate that the login was successful. There is also an [issue in the main repository](https://github.com/DependencyTrack/dependency-track/issues/5098), but I think it is only front-end related.

Image

I think I've found the error in the following file: https://github.com/DependencyTrack/frontend/blob/master/public/static/oidc-callback.html. The Vue JS, a state update in render/computed triggers another render, creating an endless loop, from a login redirect loop where the callback redirects to itself or to a page that immediately redirects you back to the login page.
This causes signinRedirectCallback() to be executed infinitely. I think the following lines are the cause of the error:
https://github.com/DependencyTrack/frontend/blob/e115cdd814385c43a53411a83d1249808759922e/public/static/oidc-callback.html#L50
`const redirectTo = user.state; window.location.href = redirectTo && isUrlSaveForRedirect(redirectTo) ? redirectTo : "../";`

### Steps to Reproduce

1.Register the application in azure
2.Setup the appreg parameters in helm or docker compose
3.Click login and check the devtools console log

### Expected Behavior

Redirect to dashboard

### Dependency-Track Frontend Version

4.13.3

### Browser

Google Chrome

### Browser Version

138.0.7204.184

### Operating System

macOS

### Checklist

- [x] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [x] I have checked the [existing issues](https://github.com/DependencyTrack/frontend/issues) for whether this defect was already reported

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.