mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
additional param checks (#16910)
This commit is contained in:
@@ -14,7 +14,10 @@ export default Route.extend({
|
|||||||
}
|
}
|
||||||
path = window.decodeURIComponent(path);
|
path = window.decodeURIComponent(path);
|
||||||
const source = 'oidc-callback'; // required by event listener in auth-jwt component
|
const source = 'oidc-callback'; // required by event listener in auth-jwt component
|
||||||
let queryParams = { source, namespace, path, code, state };
|
let queryParams = { source, path: path || '', code: code || '', state: state || '' };
|
||||||
|
if (namespace) {
|
||||||
|
queryParams.namespace = namespace;
|
||||||
|
}
|
||||||
window.opener.postMessage(queryParams, window.origin);
|
window.opener.postMessage(queryParams, window.origin);
|
||||||
},
|
},
|
||||||
setupController(controller) {
|
setupController(controller) {
|
||||||
|
|||||||
@@ -152,11 +152,11 @@ module('Unit | Route | vault/cluster/oidc-callback', function (hooks) {
|
|||||||
assert.propContains(
|
assert.propContains(
|
||||||
this.windowStub.lastCall.args[0],
|
this.windowStub.lastCall.args[0],
|
||||||
{
|
{
|
||||||
code: undefined,
|
code: '',
|
||||||
path: 'oidc',
|
path: 'oidc',
|
||||||
state: undefined,
|
state: '',
|
||||||
},
|
},
|
||||||
'model hook returns non-existent state param'
|
'model hook returns empty string when state param nonexistent'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user