mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: cross site scripting issue on /share pages (#16255)
This commit is contained in:
parent
caea3a0812
commit
e4b6efc1f5
4 changed files with 58 additions and 11 deletions
|
|
@ -95,7 +95,7 @@ describe('/shared-links', () => {
|
|||
expect(resp.status).toBe(200);
|
||||
expect(resp.header['content-type']).toContain('text/html');
|
||||
expect(resp.text).toContain(
|
||||
`<meta name="description" content="${metadataAlbum.assets.length} shared photos & videos" />`,
|
||||
`<meta name="description" content="${metadataAlbum.assets.length} shared photos & videos" />`,
|
||||
);
|
||||
});
|
||||
|
||||
|
|
@ -103,14 +103,14 @@ describe('/shared-links', () => {
|
|||
const resp = await request(shareUrl).get(`/${linkWithAlbum.key}`);
|
||||
expect(resp.status).toBe(200);
|
||||
expect(resp.header['content-type']).toContain('text/html');
|
||||
expect(resp.text).toContain(`<meta name="description" content="0 shared photos & videos" />`);
|
||||
expect(resp.text).toContain(`<meta name="description" content="0 shared photos & videos" />`);
|
||||
});
|
||||
|
||||
it('should have correct asset count in meta tag for shared asset', async () => {
|
||||
const resp = await request(shareUrl).get(`/${linkWithAssets.key}`);
|
||||
expect(resp.status).toBe(200);
|
||||
expect(resp.header['content-type']).toContain('text/html');
|
||||
expect(resp.text).toContain(`<meta name="description" content="1 shared photos & videos" />`);
|
||||
expect(resp.text).toContain(`<meta name="description" content="1 shared photos & videos" />`);
|
||||
});
|
||||
|
||||
it('should have fqdn og:image meta tag for shared asset', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue