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
I'm updating a remix project because of vulnerability issues. This project is made by old colleagues about two years ago.
It's generally not a problem to upgrade the application, but I have two methods that aren't documented. I've also found this discussion #267 but as an outsider it is difficult to assess the impact
It's very difficult at the moment to see what the current implementation does, and how to change it to the new versions.
It's about the following to methods:
`import { createAuthenticityToken } from 'remix-utils';
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm updating a remix project because of vulnerability issues. This project is made by old colleagues about two years ago.
It's generally not a problem to upgrade the application, but I have two methods that aren't documented. I've also found this discussion #267 but as an outsider it is difficult to assess the impact
It's very difficult at the moment to see what the current implementation does, and how to change it to the new versions.
It's about the following to methods:
`import { createAuthenticityToken } from 'remix-utils';
export const vacancyLoaderFactory =
(key: keyof Pick<LookupControllerRetrieveVacancyDetailsRequest, 'id' | 'slug'>) =>
async ({ params, request }: LoaderFunctionArgs) => {
invariant(params[key],
Expected params.${key}
);` import { verifyAuthenticityToken } from 'remix-utils';
}: ActionFunctionArgs): Promise<TypedResponse<ValidatorError | { result: 'success' } | { result: 'gateway_validation_error'; errors: string[] }>> {
const { session } = await getSession(request);
await verifyAuthenticityToken(request, session);
}`
Can someone help me with the migration of these two methods?
Beta Was this translation helpful? Give feedback.
All reactions