You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JasonPaape opened this issue
Mar 24, 2020
· 3 comments
Labels
bugA problem that needs to be fixed for the feature to function as intended.p1P1 and P2 are priorities of the bug. P1 bugs should get Fixed/Closed within 4 weeks.
Found while using Angular 9 with @azure/msal-angular 1.0.0-beta.4 but that's irrelevant, the bug is in msal-core.
Description
There is a null reference bug at msal-core/src/ServerRequestParameters.ts in function 'populateQueryParams' at line 116:
// sanity check for developer passed extraQueryParameters
const eQParams: StringDict = request.extraQueryParameters;
Where 'request' can be null. There is a check above on line 88 'if (request)' but line 116 is outside of that.
This happens when the 'populateQueryParams' is called from msal-core/src/UserAgentApplication.ts
in function 'acquireTokenSilent' at line 644:
serverAuthenticationRequest.populateQueryParams(account, null, adalIdTokenObject);
Note the second param passed is null.
The code in ServerRequestParameters.ts line 116 should have a null check or be moved into the above 'if (request)' block.
Security
No
Regression
Unknown
Configuration
Irrelevant.
Reproduction steps
Call acquireTokenSilent with AuthenticationParameters containing values set to flow into this block on line 640 of UserAgentApplication.ts:
// if user didn't pass login_hint/sid and adal's idtoken is present, extract the login_hint from the adalIdToken
else if (!account && !StringUtils.isEmpty(adalIdToken)) {
See that null gets passed on line 644
And that in line 116 of ServerRequestParameters.ts a null exception occurs causing a runtime script exception visible in the console.
Expected behavior
Expect no script errors, and for aquireTokenSilent to function correctly.
Browsers
Not browser specific.
The text was updated successfully, but these errors were encountered:
JasonPaape
added
the
bug
A problem that needs to be fixed for the feature to function as intended.
label
Mar 24, 2020
This addresses AzureAD#1411, AzureAD#1237, and AzureAD#1254. I don’t know why some of these type errors are passing compilation as they should be breaking it?
Untested, edited code in browser window.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugA problem that needs to be fixed for the feature to function as intended.p1P1 and P2 are priorities of the bug. P1 bugs should get Fixed/Closed within 4 weeks.
Library
msal@1.2.2-beta.3
Framework
Found while using Angular 9 with @azure/msal-angular 1.0.0-beta.4 but that's irrelevant, the bug is in msal-core.
Description
There is a null reference bug at msal-core/src/ServerRequestParameters.ts in function 'populateQueryParams' at line 116:
// sanity check for developer passed extraQueryParameters
const eQParams: StringDict = request.extraQueryParameters;
Where 'request' can be null. There is a check above on line 88 'if (request)' but line 116 is outside of that.
This happens when the 'populateQueryParams' is called from msal-core/src/UserAgentApplication.ts
in function 'acquireTokenSilent' at line 644:
serverAuthenticationRequest.populateQueryParams(account, null, adalIdTokenObject);
Note the second param passed is null.
The code in ServerRequestParameters.ts line 116 should have a null check or be moved into the above 'if (request)' block.
Security
No
Regression
Unknown
Configuration
Irrelevant.
Reproduction steps
// if user didn't pass login_hint/sid and adal's idtoken is present, extract the login_hint from the adalIdToken
else if (!account && !StringUtils.isEmpty(adalIdToken)) {
Expected behavior
Expect no script errors, and for aquireTokenSilent to function correctly.
Browsers
Not browser specific.
The text was updated successfully, but these errors were encountered: