@azure/msal-browser 5.20.0 → 5.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/app/IPublicClientApplication.mjs +1 -1
  2. package/dist/app/PublicClientApplication.mjs +1 -1
  3. package/dist/broker/nativeBroker/NativeStatusCodes.mjs +1 -1
  4. package/dist/broker/nativeBroker/PlatformAuthDOMHandler.mjs +1 -1
  5. package/dist/broker/nativeBroker/PlatformAuthExtensionHandler.mjs +1 -1
  6. package/dist/broker/nativeBroker/PlatformAuthProvider.mjs +1 -1
  7. package/dist/cache/AccountManager.mjs +1 -1
  8. package/dist/cache/AsyncMemoryStorage.mjs +1 -1
  9. package/dist/cache/BrowserCacheManager.mjs +1 -1
  10. package/dist/cache/CacheHelpers.mjs +1 -1
  11. package/dist/cache/CacheKeys.mjs +1 -1
  12. package/dist/cache/CookieStorage.mjs +1 -1
  13. package/dist/cache/DatabaseStorage.mjs +1 -1
  14. package/dist/cache/EncryptedData.mjs +1 -1
  15. package/dist/cache/LocalStorage.mjs +1 -1
  16. package/dist/cache/MemoryStorage.mjs +1 -1
  17. package/dist/cache/SessionStorage.mjs +1 -1
  18. package/dist/cache/TokenCache.mjs +1 -1
  19. package/dist/config/Configuration.mjs +1 -1
  20. package/dist/controllers/NestedAppAuthController.mjs +1 -1
  21. package/dist/controllers/StandardController.mjs +1 -1
  22. package/dist/crypto/BrowserCrypto.mjs +1 -1
  23. package/dist/crypto/CryptoOps.mjs +1 -1
  24. package/dist/crypto/PkceGenerator.mjs +1 -1
  25. package/dist/crypto/SignedHttpRequest.mjs +1 -1
  26. package/dist/crypto/TokenBindingKeyManager.mjs +1 -1
  27. package/dist/custom_auth/CustomAuthConstants.mjs +1 -1
  28. package/dist/custom_auth/CustomAuthPublicClientApplication.mjs +1 -1
  29. package/dist/custom_auth/controller/CustomAuthStandardController.mjs +1 -1
  30. package/dist/custom_auth/core/CustomAuthAuthority.mjs +1 -1
  31. package/dist/custom_auth/core/auth_flow/AuthFlowErrorBase.mjs +1 -1
  32. package/dist/custom_auth/core/auth_flow/AuthFlowResultBase.mjs +1 -1
  33. package/dist/custom_auth/core/auth_flow/AuthFlowState.mjs +1 -1
  34. package/dist/custom_auth/core/auth_flow/AuthFlowStateTypes.mjs +1 -1
  35. package/dist/custom_auth/core/auth_flow/jit/error_type/AuthMethodRegistrationError.mjs +1 -1
  36. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationChallengeMethodResult.mjs +1 -1
  37. package/dist/custom_auth/core/auth_flow/jit/result/AuthMethodRegistrationSubmitChallengeResult.mjs +1 -1
  38. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationCompletedState.mjs +1 -1
  39. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationFailedState.mjs +1 -1
  40. package/dist/custom_auth/core/auth_flow/jit/state/AuthMethodRegistrationState.mjs +1 -1
  41. package/dist/custom_auth/core/auth_flow/mfa/error_type/MfaError.mjs +1 -1
  42. package/dist/custom_auth/core/auth_flow/mfa/result/MfaRequestChallengeResult.mjs +1 -1
  43. package/dist/custom_auth/core/auth_flow/mfa/result/MfaSubmitChallengeResult.mjs +1 -1
  44. package/dist/custom_auth/core/auth_flow/mfa/state/MfaCompletedState.mjs +1 -1
  45. package/dist/custom_auth/core/auth_flow/mfa/state/MfaFailedState.mjs +1 -1
  46. package/dist/custom_auth/core/auth_flow/mfa/state/MfaState.mjs +1 -1
  47. package/dist/custom_auth/core/error/CustomAuthApiError.mjs +1 -1
  48. package/dist/custom_auth/core/error/CustomAuthError.mjs +1 -1
  49. package/dist/custom_auth/core/error/HttpError.mjs +1 -1
  50. package/dist/custom_auth/core/error/HttpErrorCodes.mjs +1 -1
  51. package/dist/custom_auth/core/error/InvalidArgumentError.mjs +1 -1
  52. package/dist/custom_auth/core/error/InvalidConfigurationError.mjs +1 -1
  53. package/dist/custom_auth/core/error/InvalidConfigurationErrorCodes.mjs +1 -1
  54. package/dist/custom_auth/core/error/MethodNotImplementedError.mjs +1 -1
  55. package/dist/custom_auth/core/error/MsalCustomAuthError.mjs +1 -1
  56. package/dist/custom_auth/core/error/NoCachedAccountFoundError.mjs +1 -1
  57. package/dist/custom_auth/core/error/ParsedUrlError.mjs +1 -1
  58. package/dist/custom_auth/core/error/ParsedUrlErrorCodes.mjs +1 -1
  59. package/dist/custom_auth/core/error/UnexpectedError.mjs +1 -1
  60. package/dist/custom_auth/core/error/UnsupportedEnvironmentError.mjs +1 -1
  61. package/dist/custom_auth/core/error/UserAccountAttributeError.mjs +1 -1
  62. package/dist/custom_auth/core/error/UserAlreadySignedInError.mjs +1 -1
  63. package/dist/custom_auth/core/interaction_client/CustomAuthInteractionClientBase.mjs +1 -1
  64. package/dist/custom_auth/core/interaction_client/CustomAuthInterationClientFactory.mjs +1 -1
  65. package/dist/custom_auth/core/interaction_client/jit/JitClient.mjs +1 -1
  66. package/dist/custom_auth/core/interaction_client/jit/result/JitActionResult.mjs +1 -1
  67. package/dist/custom_auth/core/interaction_client/mfa/MfaClient.mjs +1 -1
  68. package/dist/custom_auth/core/interaction_client/mfa/result/MfaActionResult.mjs +1 -1
  69. package/dist/custom_auth/core/network_client/custom_auth_api/BaseApiClient.mjs +1 -1
  70. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiClient.mjs +1 -1
  71. package/dist/custom_auth/core/network_client/custom_auth_api/CustomAuthApiEndpoint.mjs +1 -1
  72. package/dist/custom_auth/core/network_client/custom_auth_api/RegisterApiClient.mjs +1 -1
  73. package/dist/custom_auth/core/network_client/custom_auth_api/ResetPasswordApiClient.mjs +1 -1
  74. package/dist/custom_auth/core/network_client/custom_auth_api/SignInApiClient.mjs +1 -1
  75. package/dist/custom_auth/core/network_client/custom_auth_api/SignupApiClient.mjs +1 -1
  76. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiErrorCodes.mjs +1 -1
  77. package/dist/custom_auth/core/network_client/custom_auth_api/types/ApiSuberrors.mjs +1 -1
  78. package/dist/custom_auth/core/network_client/http_client/FetchHttpClient.mjs +1 -1
  79. package/dist/custom_auth/core/network_client/http_client/IHttpClient.mjs +1 -1
  80. package/dist/custom_auth/core/telemetry/PublicApiId.mjs +1 -1
  81. package/dist/custom_auth/core/utils/ArgumentValidator.mjs +1 -1
  82. package/dist/custom_auth/core/utils/CustomHeaderUtils.mjs +1 -1
  83. package/dist/custom_auth/core/utils/UrlUtils.mjs +1 -1
  84. package/dist/custom_auth/get_account/auth_flow/CustomAuthAccountData.mjs +1 -1
  85. package/dist/custom_auth/get_account/auth_flow/error_type/GetAccountError.mjs +1 -1
  86. package/dist/custom_auth/get_account/auth_flow/result/GetAccessTokenResult.mjs +1 -1
  87. package/dist/custom_auth/get_account/auth_flow/result/GetAccountResult.mjs +1 -1
  88. package/dist/custom_auth/get_account/auth_flow/result/SignOutResult.mjs +1 -1
  89. package/dist/custom_auth/get_account/auth_flow/state/GetAccessTokenState.mjs +1 -1
  90. package/dist/custom_auth/get_account/auth_flow/state/GetAccountState.mjs +1 -1
  91. package/dist/custom_auth/get_account/auth_flow/state/SignOutState.mjs +1 -1
  92. package/dist/custom_auth/get_account/interaction_client/CustomAuthSilentCacheClient.mjs +1 -1
  93. package/dist/custom_auth/index.mjs +1 -1
  94. package/dist/custom_auth/operating_context/CustomAuthOperatingContext.mjs +1 -1
  95. package/dist/custom_auth/reset_password/auth_flow/error_type/ResetPasswordError.mjs +1 -1
  96. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordResendCodeResult.mjs +1 -1
  97. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordStartResult.mjs +1 -1
  98. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitCodeResult.mjs +1 -1
  99. package/dist/custom_auth/reset_password/auth_flow/result/ResetPasswordSubmitPasswordResult.mjs +1 -1
  100. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCodeRequiredState.mjs +1 -1
  101. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordCompletedState.mjs +1 -1
  102. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordFailedState.mjs +1 -1
  103. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordPasswordRequiredState.mjs +1 -1
  104. package/dist/custom_auth/reset_password/auth_flow/state/ResetPasswordState.mjs +1 -1
  105. package/dist/custom_auth/reset_password/interaction_client/ResetPasswordClient.mjs +1 -1
  106. package/dist/custom_auth/sign_in/auth_flow/SignInScenario.mjs +1 -1
  107. package/dist/custom_auth/sign_in/auth_flow/error_type/SignInError.mjs +1 -1
  108. package/dist/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.mjs +1 -1
  109. package/dist/custom_auth/sign_in/auth_flow/result/SignInResult.mjs +1 -1
  110. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.mjs +1 -1
  111. package/dist/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.mjs +1 -1
  112. package/dist/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.mjs +1 -1
  113. package/dist/custom_auth/sign_in/auth_flow/state/SignInCompletedState.mjs +1 -1
  114. package/dist/custom_auth/sign_in/auth_flow/state/SignInContinuationState.mjs +1 -1
  115. package/dist/custom_auth/sign_in/auth_flow/state/SignInFailedState.mjs +1 -1
  116. package/dist/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.mjs +1 -1
  117. package/dist/custom_auth/sign_in/auth_flow/state/SignInState.mjs +1 -1
  118. package/dist/custom_auth/sign_in/interaction_client/SignInClient.mjs +1 -1
  119. package/dist/custom_auth/sign_in/interaction_client/result/SignInActionResult.mjs +1 -1
  120. package/dist/custom_auth/sign_up/auth_flow/error_type/SignUpError.mjs +1 -1
  121. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResendCodeResult.mjs +1 -1
  122. package/dist/custom_auth/sign_up/auth_flow/result/SignUpResult.mjs +1 -1
  123. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitAttributesResult.mjs +1 -1
  124. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitCodeResult.mjs +1 -1
  125. package/dist/custom_auth/sign_up/auth_flow/result/SignUpSubmitPasswordResult.mjs +1 -1
  126. package/dist/custom_auth/sign_up/auth_flow/state/SignUpAttributesRequiredState.mjs +1 -1
  127. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCodeRequiredState.mjs +1 -1
  128. package/dist/custom_auth/sign_up/auth_flow/state/SignUpCompletedState.mjs +1 -1
  129. package/dist/custom_auth/sign_up/auth_flow/state/SignUpFailedState.mjs +1 -1
  130. package/dist/custom_auth/sign_up/auth_flow/state/SignUpPasswordRequiredState.mjs +1 -1
  131. package/dist/custom_auth/sign_up/auth_flow/state/SignUpState.mjs +1 -1
  132. package/dist/custom_auth/sign_up/interaction_client/SignUpClient.mjs +1 -1
  133. package/dist/custom_auth/sign_up/interaction_client/result/SignUpActionResult.mjs +1 -1
  134. package/dist/encode/Base64Decode.mjs +1 -1
  135. package/dist/encode/Base64Encode.mjs +1 -1
  136. package/dist/error/BrowserAuthError.mjs +1 -1
  137. package/dist/error/BrowserAuthErrorCodes.mjs +1 -1
  138. package/dist/error/BrowserConfigurationAuthError.mjs +1 -1
  139. package/dist/error/BrowserConfigurationAuthErrorCodes.mjs +1 -1
  140. package/dist/error/NativeAuthError.mjs +1 -1
  141. package/dist/error/NativeAuthErrorCodes.mjs +1 -1
  142. package/dist/error/NestedAppAuthError.mjs +1 -1
  143. package/dist/event/EventHandler.mjs +1 -1
  144. package/dist/event/EventMessage.mjs +1 -1
  145. package/dist/event/EventType.mjs +1 -1
  146. package/dist/index.mjs +1 -1
  147. package/dist/index.mjs.map +1 -1
  148. package/dist/interaction_client/BaseInteractionClient.mjs +1 -1
  149. package/dist/interaction_client/HybridSpaAuthorizationCodeClient.mjs +1 -1
  150. package/dist/interaction_client/PlatformAuthInteractionClient.mjs +1 -1
  151. package/dist/interaction_client/PopupClient.mjs +1 -1
  152. package/dist/interaction_client/RedirectClient.mjs +1 -1
  153. package/dist/interaction_client/SilentAuthCodeClient.mjs +1 -1
  154. package/dist/interaction_client/SilentCacheClient.mjs +1 -1
  155. package/dist/interaction_client/SilentIframeClient.mjs +1 -1
  156. package/dist/interaction_client/SilentRefreshClient.mjs +1 -1
  157. package/dist/interaction_client/StandardInteractionClient.mjs +1 -1
  158. package/dist/interaction_handler/InteractionHandler.mjs +1 -1
  159. package/dist/interaction_handler/SilentHandler.mjs +1 -1
  160. package/dist/log-strings-mapping.json +2 -2
  161. package/dist/naa/BridgeError.mjs +1 -1
  162. package/dist/naa/BridgeProxy.mjs +1 -1
  163. package/dist/naa/BridgeStatusCode.mjs +1 -1
  164. package/dist/naa/mapping/NestedAppAuthAdapter.mjs +1 -1
  165. package/dist/navigation/NavigationClient.mjs +1 -1
  166. package/dist/network/FetchClient.mjs +1 -1
  167. package/dist/operatingcontext/BaseOperatingContext.mjs +1 -1
  168. package/dist/operatingcontext/NestedAppOperatingContext.mjs +1 -1
  169. package/dist/operatingcontext/StandardOperatingContext.mjs +1 -1
  170. package/dist/packageMetadata.mjs +2 -2
  171. package/dist/popup_relay/constants.mjs +1 -1
  172. package/dist/popup_relay/index.mjs +151 -14
  173. package/dist/popup_relay/index.mjs.map +1 -1
  174. package/dist/popup_relay/relayClient.mjs +1 -1
  175. package/dist/protocol/Authorize.mjs +1 -1
  176. package/dist/redirect_bridge/index.mjs +1 -1
  177. package/dist/request/RequestHelpers.mjs +1 -1
  178. package/dist/response/ResponseHandler.mjs +1 -1
  179. package/dist/telemetry/BrowserPerformanceClient.mjs +1 -1
  180. package/dist/telemetry/BrowserPerformanceEvents.mjs +1 -1
  181. package/dist/telemetry/BrowserPerformanceMeasurement.mjs +1 -1
  182. package/dist/telemetry/BrowserRootPerformanceEvents.mjs +1 -1
  183. package/dist/utils/BrowserConstants.mjs +1 -1
  184. package/dist/utils/BrowserProtocolUtils.mjs +1 -1
  185. package/dist/utils/BrowserUtils.mjs +1 -1
  186. package/dist/utils/Helpers.mjs +1 -1
  187. package/dist/utils/MsalFrameStatsUtils.mjs +1 -1
  188. package/dist/webBrokerBridge/PendingRequestRegistry.mjs +1 -1
  189. package/dist/webBrokerBridge/WebBrokerBridgeError.mjs +1 -1
  190. package/dist/webBrokerBridge/WebBrokerBridgeErrorMap.mjs +1 -1
  191. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs +139 -0
  192. package/dist/webBrokerBridge/adapter/CrossVersionRequestAdapter.mjs.map +1 -0
  193. package/dist/webBrokerBridge/index.mjs +7 -0
  194. package/dist/webBrokerBridge/index.mjs.map +1 -0
  195. package/lib/custom-auth-path/log-strings-mapping.json +2 -2
  196. package/lib/custom-auth-path/msal-custom-auth.cjs +90 -75
  197. package/lib/custom-auth-path/msal-custom-auth.cjs.map +1 -1
  198. package/lib/custom-auth-path/msal-custom-auth.js +90 -75
  199. package/lib/custom-auth-path/msal-custom-auth.js.map +1 -1
  200. package/lib/log-strings-mapping.json +2 -2
  201. package/lib/msal-browser.cjs +92 -77
  202. package/lib/msal-browser.cjs.map +1 -1
  203. package/lib/msal-browser.js +92 -77
  204. package/lib/msal-browser.js.map +1 -1
  205. package/lib/msal-browser.min.js +2 -2
  206. package/lib/popup-relay/msal-popup-relay.cjs +152 -15
  207. package/lib/popup-relay/msal-popup-relay.cjs.map +1 -1
  208. package/lib/popup-relay/msal-popup-relay.js +152 -15
  209. package/lib/popup-relay/msal-popup-relay.js.map +1 -1
  210. package/lib/popup-relay/msal-popup-relay.min.js +2 -2
  211. package/lib/redirect-bridge/msal-redirect-bridge.cjs +10 -10
  212. package/lib/redirect-bridge/msal-redirect-bridge.cjs.map +1 -1
  213. package/lib/redirect-bridge/msal-redirect-bridge.js +10 -10
  214. package/lib/redirect-bridge/msal-redirect-bridge.js.map +1 -1
  215. package/lib/redirect-bridge/msal-redirect-bridge.min.js +1 -1
  216. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs +295 -0
  217. package/lib/web-broker-bridge/msal-web-broker-bridge.cjs.map +1 -0
  218. package/package.json +19 -2
  219. package/src/index.ts +0 -2
  220. package/src/packageMetadata.ts +1 -1
  221. package/src/popup_relay/index.ts +202 -20
  222. package/src/webBrokerBridge/index.ts +2 -6
  223. package/types/custom_auth/CustomAuthConstants.d.ts +1 -1
  224. package/types/index.d.ts +0 -1
  225. package/types/index.d.ts.map +1 -1
  226. package/types/packageMetadata.d.ts +1 -1
  227. package/types/popup_relay/index.d.ts +27 -3
  228. package/types/popup_relay/index.d.ts.map +1 -1
  229. package/types/webBrokerBridge/index.d.cts +1 -0
  230. package/types/webBrokerBridge/index.d.ts +2 -5
  231. package/types/webBrokerBridge/index.d.ts.map +1 -1
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.20.0 2026-08-28 */
1
+ /*! @azure/msal-browser v5.22.0 2026-09-15 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -19,7 +19,7 @@
19
19
  */
20
20
  const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
21
21
 
22
- /*! @azure/msal-common v16.14.0 2026-08-28 */
22
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
23
23
  /*
24
24
  * Copyright (c) Microsoft Corporation. All rights reserved.
25
25
  * Licensed under the MIT License.
@@ -127,6 +127,142 @@ function createForm(frame, action, fields) {
127
127
  const DEFAULT_POPUP_RELAY_TIMEOUT_MS = 300000;
128
128
  const DEFAULT_POPUP_RELAY_WIDTH = 520;
129
129
  const DEFAULT_POPUP_RELAY_HEIGHT = 640;
130
+ const BAD_REQUEST_SUBERROR = "popup_relay_bad_request";
131
+ const UNSAFE_URL_SUBERROR = "popup_relay_unsafe_url";
132
+ const UNTRUSTED_AUTHORITY_SUBERROR = "popup_relay_untrusted_authority";
133
+ const INVALID_ALLOWED_ORIGIN_SUBERROR = "popup_relay_invalid_allowed_origin";
134
+ function throwRelayError(subError) {
135
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", subError);
136
+ }
137
+ function tryParseUrl(raw) {
138
+ try {
139
+ return new URL(raw);
140
+ }
141
+ catch (e) {
142
+ return null;
143
+ }
144
+ }
145
+ /**
146
+ * Reduces each configured allow-list entry to its origin so the comparison is
147
+ * robust to the shapes a developer naturally reaches for. Passing the
148
+ * configured authority (`https://login.microsoftonline.com/common`), a trailing
149
+ * slash, mixed case, or an explicit default port all normalize to the same
150
+ * origin the navigation target is compared against.
151
+ *
152
+ * A malformed entry is a configuration bug in the relay page, and silently
153
+ * dropping it would quietly change the size of the allow list, so it fails
154
+ * loudly instead.
155
+ */
156
+ function normalizeAllowedOrigins(allowedAuthorityOrigins) {
157
+ return allowedAuthorityOrigins.map((entry) => {
158
+ const parsed = typeof entry === "string" ? tryParseUrl(entry) : null;
159
+ if (!parsed ||
160
+ parsed.protocol !== "https:" ||
161
+ parsed.username ||
162
+ parsed.password) {
163
+ throwRelayError(INVALID_ALLOWED_ORIGIN_SUBERROR);
164
+ }
165
+ return parsed.origin;
166
+ });
167
+ }
168
+ /**
169
+ * Validates a navigation target taken from the relay page's hash before it can
170
+ * reach `window.open` or a form `action`.
171
+ *
172
+ * The hash is *not* authority: anyone can craft a link to the deployed relay
173
+ * page, so a target must be proven safe rather than assumed to have been built
174
+ * by MSAL. Only absolute `https:` URLs without embedded credentials are
175
+ * accepted, which rules out active/local schemes (`javascript:`, `data:`,
176
+ * `blob:`, `vbscript:`, `file:`) that would otherwise execute in — or read
177
+ * from — the relay page's own first-party security origin. `https:`-only also
178
+ * matches the scheme MSAL already requires of an authority, so it cannot reject
179
+ * a navigation MSAL would have been willing to build.
180
+ *
181
+ * When `allowedAuthorityOrigins` is omitted the origin check is skipped and any
182
+ * https target is accepted — the behavior every relay page had before this
183
+ * validation existed. An explicitly empty array means "allow nothing" and is
184
+ * honored as such rather than being treated as "unset".
185
+ */
186
+ function validateNavigationTarget(raw, allowedAuthorityOrigins) {
187
+ if (typeof raw !== "string" || !raw) {
188
+ throwRelayError(BAD_REQUEST_SUBERROR);
189
+ }
190
+ const parsed = tryParseUrl(raw);
191
+ if (!parsed ||
192
+ parsed.protocol !== "https:" ||
193
+ parsed.username ||
194
+ parsed.password) {
195
+ throwRelayError(UNSAFE_URL_SUBERROR);
196
+ }
197
+ if (allowedAuthorityOrigins !== undefined &&
198
+ !Array.isArray(allowedAuthorityOrigins)) {
199
+ throwRelayError(INVALID_ALLOWED_ORIGIN_SUBERROR);
200
+ }
201
+ const normalizedAllowedOrigins = allowedAuthorityOrigins === undefined
202
+ ? undefined
203
+ : normalizeAllowedOrigins(allowedAuthorityOrigins);
204
+ if (normalizedAllowedOrigins &&
205
+ normalizedAllowedOrigins.indexOf(parsed.origin) < 0) {
206
+ throwRelayError(UNTRUSTED_AUTHORITY_SUBERROR);
207
+ }
208
+ /*
209
+ * Return the original string rather than `parsed.href`: `window.open` and
210
+ * `form.action` resolve it with the same URL parser used here, so the
211
+ * navigation is byte-identical to what MSAL built and no normalization can
212
+ * alter an authority's query encoding.
213
+ */
214
+ return raw;
215
+ }
216
+ /**
217
+ * Parses and fully validates the relayed request carried in the relay page's
218
+ * hash. Every field is treated as attacker-controlled: the shape is checked
219
+ * exactly (no implicit GET fallback for an unknown `method`) and both
220
+ * navigation targets — the GET `url` and the POST `action` — are run through
221
+ * {@link validateNavigationTarget}.
222
+ */
223
+ function parseRelayRequest(rawReq, allowedAuthorityOrigins) {
224
+ let parsed;
225
+ try {
226
+ parsed = JSON.parse(rawReq);
227
+ }
228
+ catch (e) {
229
+ parsed = null;
230
+ }
231
+ if (typeof parsed !== "object" || parsed === null) {
232
+ throwRelayError(BAD_REQUEST_SUBERROR);
233
+ }
234
+ const request = parsed;
235
+ const id = request.id;
236
+ if (typeof id !== "string" || !id) {
237
+ throwRelayError(BAD_REQUEST_SUBERROR);
238
+ }
239
+ if (request.method === "GET") {
240
+ return {
241
+ id,
242
+ method: "GET",
243
+ url: validateNavigationTarget(request.url, allowedAuthorityOrigins),
244
+ };
245
+ }
246
+ if (request.method === "POST") {
247
+ const action = validateNavigationTarget(request.action, allowedAuthorityOrigins);
248
+ const rawFields = request.fields;
249
+ if (typeof rawFields !== "object" ||
250
+ rawFields === null ||
251
+ Array.isArray(rawFields)) {
252
+ throwRelayError(BAD_REQUEST_SUBERROR);
253
+ }
254
+ const fields = {};
255
+ Object.keys(rawFields).forEach((name) => {
256
+ const value = rawFields[name];
257
+ if (typeof value !== "string") {
258
+ throwRelayError(BAD_REQUEST_SUBERROR);
259
+ }
260
+ fields[name] = value;
261
+ });
262
+ return { id, method: "POST", action, fields };
263
+ }
264
+ return throwRelayError(BAD_REQUEST_SUBERROR);
265
+ }
130
266
  /**
131
267
  * Builds the `window.open` features string for the IdP child popup from a
132
268
  * {@link PopupWindowAttributes}, mirroring the shape used by
@@ -152,13 +288,19 @@ function buildChildPopupFeatures(attributes) {
152
288
  *
153
289
  * 1. Reads the IdP navigation MSAL passed in this page's hash (a GET URL, or a
154
290
  * POST form for the form_post / EAR response modes), then scrubs the hash.
155
- * 2. Opens the IdP child popup and performs that navigation (the relay page
291
+ * 2. Validates that navigation. The relay page is directly reachable, so the
292
+ * hash is untrusted input: the request shape is checked exactly and the
293
+ * navigation target must be an absolute `https:` URL (optionally pinned to
294
+ * {@link PopupRelayOptions.allowedAuthorityOrigins}). Anything else — in
295
+ * particular active schemes such as `javascript:` — is rejected before it
296
+ * can reach `window.open` or a form `action`.
297
+ * 3. Opens the IdP child popup and performs that navigation (the relay page
156
298
  * stays put, so its `window.opener` link back to the embedded frame
157
299
  * survives COOP).
158
- * 3. Waits for the child's redirect URI page (which must run the redirect
300
+ * 4. Waits for the child's redirect URI page (which must run the redirect
159
301
  * bridge, `broadcastResponseToMainFrame`) to broadcast the raw auth
160
302
  * response over a same-origin `BroadcastChannel`.
161
- * 4. Relays that raw response back to the embedded frame via
303
+ * 5. Relays that raw response back to the embedded frame via
162
304
  * `opener.postMessage`, posting only to its own (same) origin, then closes.
163
305
  *
164
306
  * The embedded frame keeps the PKCE verifier (and EAR private key) and exchanges
@@ -182,16 +324,11 @@ function runPopupRelay(options) {
182
324
  if (!opener) {
183
325
  throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_no_opener");
184
326
  }
185
- let request;
186
- try {
187
- request = JSON.parse(rawReq);
188
- }
189
- catch (e) {
190
- throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
191
- }
192
- if (!request || !request.id) {
193
- throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
194
- }
327
+ /*
328
+ * Validate everything before opening anything: the relay page is directly
329
+ * reachable, so the hash is attacker-controlled input, not authority.
330
+ */
331
+ const request = parseRelayRequest(rawReq, options?.allowedAuthorityOrigins);
195
332
  const id = request.id;
196
333
  const channel = new BroadcastChannel(id);
197
334
  let settled = false;
@@ -1 +1 @@
1
- {"version":3,"file":"msal-popup-relay.cjs","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.14.0 2026-08-28 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;AAAA;;;AAGG;AAEH;;;;;;;;;;AAUG;AACI,MAAM,yBAAyB,GAAG,8BAA8B;;AChBvE;AAEA;AACA;AACA;AACA;AACA,SAASA,wBAAsB,CAAC,IAAI,EAAE;AACtC,IAAI,OAAO,CAAC,kCAAkC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;AACnE,CAAC;AACD;AACA;AACA;AACA,MAAM,SAAS,SAAS,KAAK,CAAC;AAC9B,IAAI,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE;AAClE,QAAQ,MAAM,OAAO,GAAG,YAAY;AACpC,aAAa,SAAS,GAAGA,wBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;AACjE,QAAQ,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;AAC7E,QAAQ,KAAK,CAAC,WAAW,CAAC,CAAC;AAC3B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;AACzC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,IAAI,EAAE,CAAC;AAC1C,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;AACvC,QAAQ,IAAI,CAAC,aAAa,GAAG,aAAa,CA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AACzD,QAAA,CAAA;IACL,CAAC,EAAE,GAAG,CAAC,CAAC;IAER,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAK;QACtC,IAAI,CAAC,OAAO,EAAE;AACV;;;AAGG;AACH,YAAA,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACjC,IAAI;gBACA,UAAU,CAAC,KAAK,EAAE,CAAC;AACtB,YAAA,CAAA;AAAC,YAAA,OAAO,CAAC,EAAE;;AAEX,YAAA,CAAA;YACD,KAAK,CAAC,EAAE,KAAK,EAAEC,QAA8B,EAAE,CAAC,CAAC;AACpD,QAAA,CAAA;AACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;AAC7D;;;;"}
1
+ {"version":3,"file":"msal-popup-relay.cjs","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.14.1 2026-09-15 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;AAAA;;;AAGG;AAEH;;;;;;;;;;AAUG;AACI,MAAM,yBAAyB,GAAG,8BAA8B;;AChBvE;AAEA;AACA;AACA;AACA;AACA,SAASA,wBAAsB,CAAC,IAAI,EAAE;AACtC,IAAI,OAAO,CAAC,kCAAkC,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;AACnE,CAAC;AACD;AACA;AACA;AACA,MAAM,SAAS,SAAS,KAAK,CAAC;AAC9B,IAAI,WAAW,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE;AAClE,QAAQ,MAAM,OAAO,GAAG,YAAY;AACpC,aAAa,SAAS,GAAGA,wBAAsB,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;AACjE,QAAQ,MAAM,WAAW,GAAG,OAAO,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;AAC7E,QAAQ,KAAK,CAAC,WAAW,CAAC,CAAC;AAC3B,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,EAAE,CAAC;AACzC,QAAQ,IAAI,CAAC,YAAY,GAAG,OAAO,IAAI,EAAE,CAAC;AAC1C,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;AACvC,QAAQ,IAAI,CAAC,aAAa,GAAG,aAAa,CAA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AAC;AACpD,QAAA,CAAA;AACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;AAC7D;;;;"}
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-browser v5.20.0 2026-08-28 */
1
+ /*! @azure/msal-browser v5.22.0 2026-09-15 */
2
2
  'use strict';
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
@@ -23,7 +23,7 @@
23
23
  */
24
24
  const POPUP_RELAY_RESPONSE_TYPE = "msal:popup-relay-response:v1";
25
25
 
26
- /*! @azure/msal-common v16.14.0 2026-08-28 */
26
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
27
27
  /*
28
28
  * Copyright (c) Microsoft Corporation. All rights reserved.
29
29
  * Licensed under the MIT License.
@@ -131,6 +131,142 @@
131
131
  const DEFAULT_POPUP_RELAY_TIMEOUT_MS = 300000;
132
132
  const DEFAULT_POPUP_RELAY_WIDTH = 520;
133
133
  const DEFAULT_POPUP_RELAY_HEIGHT = 640;
134
+ const BAD_REQUEST_SUBERROR = "popup_relay_bad_request";
135
+ const UNSAFE_URL_SUBERROR = "popup_relay_unsafe_url";
136
+ const UNTRUSTED_AUTHORITY_SUBERROR = "popup_relay_untrusted_authority";
137
+ const INVALID_ALLOWED_ORIGIN_SUBERROR = "popup_relay_invalid_allowed_origin";
138
+ function throwRelayError(subError) {
139
+ throw createBrowserAuthError(popupRelayUnsupportedFlow, "", subError);
140
+ }
141
+ function tryParseUrl(raw) {
142
+ try {
143
+ return new URL(raw);
144
+ }
145
+ catch (e) {
146
+ return null;
147
+ }
148
+ }
149
+ /**
150
+ * Reduces each configured allow-list entry to its origin so the comparison is
151
+ * robust to the shapes a developer naturally reaches for. Passing the
152
+ * configured authority (`https://login.microsoftonline.com/common`), a trailing
153
+ * slash, mixed case, or an explicit default port all normalize to the same
154
+ * origin the navigation target is compared against.
155
+ *
156
+ * A malformed entry is a configuration bug in the relay page, and silently
157
+ * dropping it would quietly change the size of the allow list, so it fails
158
+ * loudly instead.
159
+ */
160
+ function normalizeAllowedOrigins(allowedAuthorityOrigins) {
161
+ return allowedAuthorityOrigins.map((entry) => {
162
+ const parsed = typeof entry === "string" ? tryParseUrl(entry) : null;
163
+ if (!parsed ||
164
+ parsed.protocol !== "https:" ||
165
+ parsed.username ||
166
+ parsed.password) {
167
+ throwRelayError(INVALID_ALLOWED_ORIGIN_SUBERROR);
168
+ }
169
+ return parsed.origin;
170
+ });
171
+ }
172
+ /**
173
+ * Validates a navigation target taken from the relay page's hash before it can
174
+ * reach `window.open` or a form `action`.
175
+ *
176
+ * The hash is *not* authority: anyone can craft a link to the deployed relay
177
+ * page, so a target must be proven safe rather than assumed to have been built
178
+ * by MSAL. Only absolute `https:` URLs without embedded credentials are
179
+ * accepted, which rules out active/local schemes (`javascript:`, `data:`,
180
+ * `blob:`, `vbscript:`, `file:`) that would otherwise execute in — or read
181
+ * from — the relay page's own first-party security origin. `https:`-only also
182
+ * matches the scheme MSAL already requires of an authority, so it cannot reject
183
+ * a navigation MSAL would have been willing to build.
184
+ *
185
+ * When `allowedAuthorityOrigins` is omitted the origin check is skipped and any
186
+ * https target is accepted — the behavior every relay page had before this
187
+ * validation existed. An explicitly empty array means "allow nothing" and is
188
+ * honored as such rather than being treated as "unset".
189
+ */
190
+ function validateNavigationTarget(raw, allowedAuthorityOrigins) {
191
+ if (typeof raw !== "string" || !raw) {
192
+ throwRelayError(BAD_REQUEST_SUBERROR);
193
+ }
194
+ const parsed = tryParseUrl(raw);
195
+ if (!parsed ||
196
+ parsed.protocol !== "https:" ||
197
+ parsed.username ||
198
+ parsed.password) {
199
+ throwRelayError(UNSAFE_URL_SUBERROR);
200
+ }
201
+ if (allowedAuthorityOrigins !== undefined &&
202
+ !Array.isArray(allowedAuthorityOrigins)) {
203
+ throwRelayError(INVALID_ALLOWED_ORIGIN_SUBERROR);
204
+ }
205
+ const normalizedAllowedOrigins = allowedAuthorityOrigins === undefined
206
+ ? undefined
207
+ : normalizeAllowedOrigins(allowedAuthorityOrigins);
208
+ if (normalizedAllowedOrigins &&
209
+ normalizedAllowedOrigins.indexOf(parsed.origin) < 0) {
210
+ throwRelayError(UNTRUSTED_AUTHORITY_SUBERROR);
211
+ }
212
+ /*
213
+ * Return the original string rather than `parsed.href`: `window.open` and
214
+ * `form.action` resolve it with the same URL parser used here, so the
215
+ * navigation is byte-identical to what MSAL built and no normalization can
216
+ * alter an authority's query encoding.
217
+ */
218
+ return raw;
219
+ }
220
+ /**
221
+ * Parses and fully validates the relayed request carried in the relay page's
222
+ * hash. Every field is treated as attacker-controlled: the shape is checked
223
+ * exactly (no implicit GET fallback for an unknown `method`) and both
224
+ * navigation targets — the GET `url` and the POST `action` — are run through
225
+ * {@link validateNavigationTarget}.
226
+ */
227
+ function parseRelayRequest(rawReq, allowedAuthorityOrigins) {
228
+ let parsed;
229
+ try {
230
+ parsed = JSON.parse(rawReq);
231
+ }
232
+ catch (e) {
233
+ parsed = null;
234
+ }
235
+ if (typeof parsed !== "object" || parsed === null) {
236
+ throwRelayError(BAD_REQUEST_SUBERROR);
237
+ }
238
+ const request = parsed;
239
+ const id = request.id;
240
+ if (typeof id !== "string" || !id) {
241
+ throwRelayError(BAD_REQUEST_SUBERROR);
242
+ }
243
+ if (request.method === "GET") {
244
+ return {
245
+ id,
246
+ method: "GET",
247
+ url: validateNavigationTarget(request.url, allowedAuthorityOrigins),
248
+ };
249
+ }
250
+ if (request.method === "POST") {
251
+ const action = validateNavigationTarget(request.action, allowedAuthorityOrigins);
252
+ const rawFields = request.fields;
253
+ if (typeof rawFields !== "object" ||
254
+ rawFields === null ||
255
+ Array.isArray(rawFields)) {
256
+ throwRelayError(BAD_REQUEST_SUBERROR);
257
+ }
258
+ const fields = {};
259
+ Object.keys(rawFields).forEach((name) => {
260
+ const value = rawFields[name];
261
+ if (typeof value !== "string") {
262
+ throwRelayError(BAD_REQUEST_SUBERROR);
263
+ }
264
+ fields[name] = value;
265
+ });
266
+ return { id, method: "POST", action, fields };
267
+ }
268
+ return throwRelayError(BAD_REQUEST_SUBERROR);
269
+ }
134
270
  /**
135
271
  * Builds the `window.open` features string for the IdP child popup from a
136
272
  * {@link PopupWindowAttributes}, mirroring the shape used by
@@ -156,13 +292,19 @@
156
292
  *
157
293
  * 1. Reads the IdP navigation MSAL passed in this page's hash (a GET URL, or a
158
294
  * POST form for the form_post / EAR response modes), then scrubs the hash.
159
- * 2. Opens the IdP child popup and performs that navigation (the relay page
295
+ * 2. Validates that navigation. The relay page is directly reachable, so the
296
+ * hash is untrusted input: the request shape is checked exactly and the
297
+ * navigation target must be an absolute `https:` URL (optionally pinned to
298
+ * {@link PopupRelayOptions.allowedAuthorityOrigins}). Anything else — in
299
+ * particular active schemes such as `javascript:` — is rejected before it
300
+ * can reach `window.open` or a form `action`.
301
+ * 3. Opens the IdP child popup and performs that navigation (the relay page
160
302
  * stays put, so its `window.opener` link back to the embedded frame
161
303
  * survives COOP).
162
- * 3. Waits for the child's redirect URI page (which must run the redirect
304
+ * 4. Waits for the child's redirect URI page (which must run the redirect
163
305
  * bridge, `broadcastResponseToMainFrame`) to broadcast the raw auth
164
306
  * response over a same-origin `BroadcastChannel`.
165
- * 4. Relays that raw response back to the embedded frame via
307
+ * 5. Relays that raw response back to the embedded frame via
166
308
  * `opener.postMessage`, posting only to its own (same) origin, then closes.
167
309
  *
168
310
  * The embedded frame keeps the PKCE verifier (and EAR private key) and exchanges
@@ -186,16 +328,11 @@
186
328
  if (!opener) {
187
329
  throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_no_opener");
188
330
  }
189
- let request;
190
- try {
191
- request = JSON.parse(rawReq);
192
- }
193
- catch (e) {
194
- throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
195
- }
196
- if (!request || !request.id) {
197
- throw createBrowserAuthError(popupRelayUnsupportedFlow, "", "popup_relay_bad_request");
198
- }
331
+ /*
332
+ * Validate everything before opening anything: the relay page is directly
333
+ * reachable, so the hash is attacker-controlled input, not authority.
334
+ */
335
+ const request = parseRelayRequest(rawReq, options?.allowedAuthorityOrigins);
199
336
  const id = request.id;
200
337
  const channel = new BroadcastChannel(id);
201
338
  let settled = false;
@@ -1 +1 @@
1
- {"version":3,"file":"msal-popup-relay.js","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.14.0 2026-08-28 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;;;;;IAAA;;;IAGG;IAEH;;;;;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;gBACD,KAAK,CAAC,EAAE,KAAK,EAAEC,QAA8B,EAAE,CAAC,CAAC;IACpD,QAAA,CAAA;IACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;IAC7D;;;;;;;;"}
1
+ {"version":3,"file":"msal-popup-relay.js","sources":["../../../../src/popup_relay/constants.ts","../../../msal-common/dist-browser/error/AuthError.mjs","../../../../src/error/BrowserAuthErrorCodes.ts","../../../../src/error/BrowserAuthError.ts","../../../../src/utils/BrowserConstants.ts","../../../../src/protocol/Authorize.ts","../../../../src/popup_relay/index.ts"],"sourcesContent":[null,"/*! @azure/msal-common v16.14.1 2026-09-15 */\n'use strict';\n/*\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License.\r\n */\r\nfunction getDefaultErrorMessage(code) {\r\n return `See https://aka.ms/msal.js.errors#${code} for details`;\r\n}\r\n/**\r\n * General error class thrown by the MSAL.js library.\r\n */\r\nclass AuthError extends Error {\r\n constructor(errorCode, correlationId, errorMessage, suberror) {\r\n const message = errorMessage ||\r\n (errorCode ? getDefaultErrorMessage(errorCode) : \"\");\r\n const errorString = message ? `${errorCode}: ${message}` : errorCode;\r\n super(errorString);\r\n Object.setPrototypeOf(this, AuthError.prototype);\r\n this.errorCode = errorCode || \"\";\r\n this.errorMessage = message || \"\";\r\n this.subError = suberror || \"\";\r\n this.correlationId = correlationId;\r\n this.name = \"AuthError\";\r\n }\r\n}\r\nfunction createAuthError(code, correlationId, additionalMessage) {\r\n return new AuthError(code, correlationId, additionalMessage || getDefaultErrorMessage(code));\r\n}\n\nexport { AuthError, createAuthError, getDefaultErrorMessage };\n//# sourceMappingURL=AuthError.mjs.map\n",null,null,null,null,null],"names":["getDefaultErrorMessage","BrowserAuthErrorCodes.popupRelayUnsupportedFlow","BrowserAuthErrorCodes.popupWindowError","BrowserAuthErrorCodes.userCancelled","BrowserAuthErrorCodes.timedOut"],"mappings":";;;;;;;;IAAA;;;IAG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AAU,EAAE;YACb,KAAK,CAAC,EAAE,KAAK,EAAEC,gBAAsC,EAAE,CAAC,CAAC;YACzD,OAAO;IACV,IAAA,CAAA;IAED,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;IAC3B,QAAA,UAAU,CACN,UAAU,CAAC,QAAQ,EACnB,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,CACjB,CAAC,MAAM,EAAE,CAAC;IACd,IAAA,CAAA;QAED,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC,MAAK;IACxC,QAAA,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE;IAC/B;;;;;;;IAOG;IACH,YAAA,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC/B,KAAK,CAAC,EAAE,KAAK,EAAEC,aAAmC,EAAE,CAAC,CAAC;IACzD,QAAA,CAAA;QACL,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAK;YACtC,IAAI,CAAC,OAAO,EAAE;IACV;;;IAGG;IACH,YAAA,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBACjC,IAAI;oBACA,UAAU,CAAC,KAAK,EAAE,CAAC;IACtB,YAAA,CAAA;IAAC,YAAA,OAAO,CAAC,EAAE;;IAEX,YAAA,CAAA;gBACD,KAAK,CAAC,EAAE,KAAK,EAAEC,QAA8B,EAAE,CAAC,CAAC;IACpD,QAAA,CAAA;IACL,IAAA,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,8BAA8B,CAAC,CAAC;IAC7D;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- /*! @azure/msal-browser v5.20.0 2026-08-28 */
2
- "use strict";!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).msalPopupRelay={})}(this,function(e){class o extends Error{constructor(e,t,r,n){const s=r||(e?`See https://aka.ms/msal.js.errors#${e} for details`:"");super(s?`${e}: ${s}`:e),Object.setPrototypeOf(this,o.prototype),this.errorCode=e||"",this.errorMessage=s||"",this.subError=n||"",this.correlationId=t,this.name="AuthError"}}const t="popup_relay_unsupported_flow";class r extends o{constructor(e,o,t){super(e,o,`See https://aka.ms/msal.js.errors#${e} for details`,t),Object.setPrototypeOf(this,r.prototype),this.name="BrowserAuthError"}}function n(e,o,t){return new r(e,o,t)}var s;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(s||(s={}));e.runPopupRelay=function(e){const o=window.opener,r=window.location.origin,s=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("req")||"";if("function"==typeof window.history.replaceState&&window.history.replaceState(null,"",window.location.origin+window.location.pathname),!o)throw n(t,"","popup_relay_no_opener");let i;try{i=JSON.parse(s)}catch(e){throw n(t,"","popup_relay_bad_request")}if(!i||!i.id)throw n(t,"","popup_relay_bad_request");const p=i.id,a=new BroadcastChannel(p);let l=!1;const c={},d=e=>{if(!l){l=!0;try{a.close()}catch(e){}clearInterval(c.closedPoll),clearTimeout(c.timeoutId),o.postMessage({type:"msal:popup-relay-response:v1",id:p,...e},r),setTimeout(()=>{try{window.close()}catch(e){}},0)}};a.onmessage=e=>{const o=e.data&&e.data.payload;o&&d({payload:o})};const u=function(e){const o=[`width=${e?.popupSize?.width||520}`,`height=${e?.popupSize?.height||640}`];return void 0!==e?.popupPosition?.top&&o.push(`top=${e.popupPosition.top}`),void 0!==e?.popupPosition?.left&&o.push(`left=${e.popupPosition.left}`),o.push("scrollbars=yes"),o.join(",")}(e?.popupWindowAttributes),h="POST"===i.method?window.open("about:blank","msalPopupRelayChild",u):window.open(i.url,"msalPopupRelayChild",u);h?("POST"===i.method&&function(e,o,t){const r=e.createElement("form");return r.method="post",r.action=o,Object.keys(t).forEach(o=>{const n=e.createElement("input");n.hidden=!0,n.name=o,n.value=t[o],r.appendChild(n)}),e.body.appendChild(r),r}(h.document,i.action,i.fields).submit(),c.closedPoll=window.setInterval(()=>{h.closed&&!l&&(clearTimeout(c.timeoutId),d({error:"user_cancelled"}))},500),c.timeoutId=window.setTimeout(()=>{if(!l){clearInterval(c.closedPoll);try{h.close()}catch(e){}d({error:"timed_out"})}},e?.timeoutMs||3e5)):d({error:"popup_window_error"})}});
1
+ /*! @azure/msal-browser v5.22.0 2026-09-15 */
2
+ "use strict";!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((o="undefined"!=typeof globalThis?globalThis:o||self).msalPopupRelay={})}(this,function(o){class t extends Error{constructor(o,e,r,n){const i=r||(o?`See https://aka.ms/msal.js.errors#${o} for details`:"");super(i?`${o}: ${i}`:o),Object.setPrototypeOf(this,t.prototype),this.errorCode=o||"",this.errorMessage=i||"",this.subError=n||"",this.correlationId=e,this.name="AuthError"}}const e="popup_relay_unsupported_flow";class r extends t{constructor(o,t,e){super(o,t,`See https://aka.ms/msal.js.errors#${o} for details`,e),Object.setPrototypeOf(this,r.prototype),this.name="BrowserAuthError"}}function n(o,t,e){return new r(o,t,e)}var i;!function(o){o.Redirect="redirect",o.Popup="popup",o.Silent="silent",o.None="none"}(i||(i={}));const s="popup_relay_bad_request",p="popup_relay_invalid_allowed_origin";function a(o){throw n(e,"",o)}function l(o){try{return new URL(o)}catch(o){return null}}function u(o,t){"string"==typeof o&&o||a(s);const e=l(o);(!e||"https:"!==e.protocol||e.username||e.password)&&a("popup_relay_unsafe_url"),void 0===t||Array.isArray(t)||a(p);const r=void 0===t?void 0:function(o){return o.map(o=>{const t="string"==typeof o?l(o):null;return(!t||"https:"!==t.protocol||t.username||t.password)&&a(p),t.origin})}(t);return r&&r.indexOf(e.origin)<0&&a("popup_relay_untrusted_authority"),o}o.runPopupRelay=function(o){const t=window.opener,r=window.location.origin,i=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("req")||"";if("function"==typeof window.history.replaceState&&window.history.replaceState(null,"",window.location.origin+window.location.pathname),!t)throw n(e,"","popup_relay_no_opener");const p=function(o,t){let e;try{e=JSON.parse(o)}catch(o){e=null}"object"==typeof e&&null!==e||a(s);const r=e,n=r.id;if("string"==typeof n&&n||a(s),"GET"===r.method)return{id:n,method:"GET",url:u(r.url,t)};if("POST"===r.method){const o=u(r.action,t),e=r.fields;("object"!=typeof e||null===e||Array.isArray(e))&&a(s);const i={};return Object.keys(e).forEach(o=>{const t=e[o];"string"!=typeof t&&a(s),i[o]=t}),{id:n,method:"POST",action:o,fields:i}}return a(s)}(i,o?.allowedAuthorityOrigins),l=p.id,c=new BroadcastChannel(l);let d=!1;const h={},f=o=>{if(!d){d=!0;try{c.close()}catch(o){}clearInterval(h.closedPoll),clearTimeout(h.timeoutId),t.postMessage({type:"msal:popup-relay-response:v1",id:l,...o},r),setTimeout(()=>{try{window.close()}catch(o){}},0)}};c.onmessage=o=>{const t=o.data&&o.data.payload;t&&f({payload:t})};const y=function(o){const t=[`width=${o?.popupSize?.width||520}`,`height=${o?.popupSize?.height||640}`];return void 0!==o?.popupPosition?.top&&t.push(`top=${o.popupPosition.top}`),void 0!==o?.popupPosition?.left&&t.push(`left=${o.popupPosition.left}`),t.push("scrollbars=yes"),t.join(",")}(o?.popupWindowAttributes),w="POST"===p.method?window.open("about:blank","msalPopupRelayChild",y):window.open(p.url,"msalPopupRelayChild",y);w?("POST"===p.method&&function(o,t,e){const r=o.createElement("form");return r.method="post",r.action=t,Object.keys(e).forEach(t=>{const n=o.createElement("input");n.hidden=!0,n.name=t,n.value=e[t],r.appendChild(n)}),o.body.appendChild(r),r}(w.document,p.action,p.fields).submit(),h.closedPoll=window.setInterval(()=>{w.closed&&!d&&(clearTimeout(h.timeoutId),f({error:"user_cancelled"}))},500),h.timeoutId=window.setTimeout(()=>{if(!d){clearInterval(h.closedPoll);try{w.close()}catch(o){}f({error:"timed_out"})}},o?.timeoutMs||3e5)):f({error:"popup_window_error"})}});
@@ -1,8 +1,8 @@
1
- /*! @azure/msal-browser v5.20.0 2026-08-28 */
1
+ /*! @azure/msal-browser v5.22.0 2026-09-15 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
5
- /*! @azure/msal-common v16.14.0 2026-08-28 */
5
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
6
6
  // Resource delimiter - used for certain cache entries
7
7
  const RESOURCE_DELIM = "|";
8
8
  const FORWARD_SLASH = "/";
@@ -13,7 +13,7 @@ const AADAuthority = {
13
13
  COMMON: "common",
14
14
  ORGANIZATIONS: "organizations"};
15
15
 
16
- /*! @azure/msal-common v16.14.0 2026-08-28 */
16
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
17
17
  /*
18
18
  * Copyright (c) Microsoft Corporation. All rights reserved.
19
19
  * Licensed under the MIT License.
@@ -39,7 +39,7 @@ class AuthError extends Error {
39
39
  }
40
40
  }
41
41
 
42
- /*! @azure/msal-common v16.14.0 2026-08-28 */
42
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
43
43
 
44
44
  /*
45
45
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -62,11 +62,11 @@ function createClientAuthError(errorCode, correlationId, additionalMessage) {
62
62
  return new ClientAuthError(errorCode, correlationId, additionalMessage);
63
63
  }
64
64
 
65
- /*! @azure/msal-common v16.14.0 2026-08-28 */
65
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
66
66
  const invalidState = "invalid_state";
67
67
  const noCryptoObject = "no_crypto_object";
68
68
 
69
- /*! @azure/msal-common v16.14.0 2026-08-28 */
69
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
70
70
 
71
71
  /*
72
72
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -86,12 +86,12 @@ function createClientConfigurationError(errorCode, correlationId) {
86
86
  return new ClientConfigurationError(errorCode, correlationId);
87
87
  }
88
88
 
89
- /*! @azure/msal-common v16.14.0 2026-08-28 */
89
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
90
90
  const authorityUriInsecure = "authority_uri_insecure";
91
91
  const urlParseError = "url_parse_error";
92
92
  const urlEmptyError = "empty_url_error";
93
93
 
94
- /*! @azure/msal-common v16.14.0 2026-08-28 */
94
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
95
95
  /*
96
96
  * Copyright (c) Microsoft Corporation. All rights reserved.
97
97
  * Licensed under the MIT License.
@@ -171,7 +171,7 @@ class StringUtils {
171
171
  }
172
172
  }
173
173
 
174
- /*! @azure/msal-common v16.14.0 2026-08-28 */
174
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
175
175
 
176
176
  /*
177
177
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -329,7 +329,7 @@ class UrlString {
329
329
  }
330
330
  }
331
331
 
332
- /*! @azure/msal-common v16.14.0 2026-08-28 */
332
+ /*! @azure/msal-common v16.14.1 2026-09-15 */
333
333
  /**
334
334
  * Parses the state into the RequestStateObject, which contains the LibraryState info and the state passed by the user.
335
335
  * @param base64Decode