Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/stega/filterDefault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ export const filterDefault: FilterDefault = ({sourcePath, resultPath, value}) =>
}

const denylist = new Set([
'aspect_ratio',
'aspectRatio',
'blurHash',
'color',
'colour',
'currency',
'email',
'encoding_tier',
'format',
'gid',
'hex',
Expand All @@ -61,9 +65,14 @@ const denylist = new Set([
'linkAction',
'locale',
'lqip',
'master_access',
'max_resolution_tier',
'max_stored_resolution',
'mp4_support',
'page',
'path',
'ref',
'resolution_tier',
'rgb',
'rgba',
'route',
Expand All @@ -72,13 +81,17 @@ const denylist = new Set([
'status',
'tag',
'template',
'textTheme',
'theme',
'thumbHash',
'type',
'textTheme',
'unit',
'upload_id',
'url',
'username',
'variant',
'video_quality',
'video_resolution',
'website',
])

Expand Down
15 changes: 14 additions & 1 deletion test/stega/filterDefault.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,14 @@ describe('filterDefault', () => {

describe('Denylist handling', () => {
test.each([
['aspect_ratio'],
['aspectRatio'],
['blurHash'],
['color'],
['colour'],
['currency'],
['email'],
['encoding_tier'],
['format'],
['gid'],
['hex'],
Expand All @@ -295,9 +299,14 @@ describe('filterDefault', () => {
['linkAction'],
['locale'],
['lqip'],
['master_access'],
['max_resolution_tier'],
['max_stored_resolution'],
['mp4_support'],
['page'],
['path'],
['ref'],
['resolution_tier'],
['rgb'],
['rgba'],
['route'],
Expand All @@ -306,13 +315,17 @@ describe('filterDefault', () => {
['status'],
['tag'],
['template'],
['textTheme'],
['theme'],
['thumbHash'],
['type'],
['textTheme'],
['unit'],
['upload_id'],
['url'],
['username'],
['variant'],
['video_quality'],
['video_resolution'],
['website'],
])('should skip encoding denylisted key "%s"', (key) => {
const result = filterDefault({
Expand Down