Skip to content

Commit

Permalink
fix(cm): back button on ListSettingsView doesn't work (#20263)
Browse files Browse the repository at this point in the history
  • Loading branch information
xdeelord24 committed May 8, 2024
1 parent 9c79921 commit 53507a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const ListSettingsView = ({ layout, slug }) => {
<Link
startIcon={<ArrowLeft />}
to={{
to: `/content-manager/${kind}/${uid}`,
pathname: `/content-manager/${kind}/${uid}`,
search: stringify(
{
page: 1,
Expand Down
9 changes: 4 additions & 5 deletions packages/plugins/users-permissions/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,25 @@ module.exports = {
uCallback = new URL(callback);
uProviderCallback = new URL(provider.callback);
} catch {
throw new Error('The callback is not a valid URL')
throw new Error('The callback is not a valid URL');
}


// Make sure the different origin matches
if(uCallback.origin !== uProviderCallback.origin) {
if (uCallback.origin !== uProviderCallback.origin) {
throw new Error(
`Forbidden callback provided: origins don't match. Please verify your config.`
);
}

// Make sure the different pathname matches
if(uCallback.pathname !== uProviderCallback.pathname) {
if (uCallback.pathname !== uProviderCallback.pathname) {
throw new Error(
`Forbidden callback provided: pathname don't match. Please verify your config.`
);
}

// NOTE: We're not checking the search parameters on purpose to allow passing different states
}
},
},
}),
validator() {},
Expand Down

0 comments on commit 53507a6

Please sign in to comment.