fix: enforce representation blob ownership and secure SSR access
This commit is contained in:
@@ -304,7 +304,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
break;
|
||||
case "myRepresentations":
|
||||
const myRepresentations = await getRepsFromBlob(
|
||||
thisSession.user.id
|
||||
thisSession.user.id,
|
||||
{ headers: { Cookie: req.headers.cookie || "" } }
|
||||
);
|
||||
|
||||
const myRepresentationsDetails = await getDetails(
|
||||
|
||||
@@ -293,7 +293,9 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
awaitingSubmissionFromBlob
|
||||
] = await Promise.all([
|
||||
isLPA ? getMyLPACases(lpaId) : getMyCases(loggedInUser),
|
||||
getRepsFromBlob(thisSession.user.id),
|
||||
getRepsFromBlob(thisSession.user.id, {
|
||||
headers: { Cookie: req.headers.cookie || "" }
|
||||
}),
|
||||
getWatchedCases(loggedInUser),
|
||||
getAwaitingSubmissionFromBlob(thisSession.user.id)
|
||||
]);
|
||||
|
||||
@@ -371,7 +371,8 @@ export const getServerSideProps = wrapper.getServerSideProps(
|
||||
|
||||
case "myRepresentations": {
|
||||
const myRepresentations = await getRepsFromBlob(
|
||||
thisSession.user.id
|
||||
thisSession.user.id,
|
||||
{ headers: { Cookie: ctx.req?.headers?.cookie || "" } }
|
||||
);
|
||||
|
||||
// The existing View All component reads
|
||||
|
||||
Reference in New Issue
Block a user