Skip to content
Draft
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
5 changes: 5 additions & 0 deletions projects/ngx-translate/src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ export function setValue(target: any, key: string, value: any): void {
for (let i = 0; i < keys.length; i++) {
const key = keys[i];

// Skip dangerous properties to prevent prototype pollution
if (key === '__proto__' || key === 'constructor') {
continue;
}

// If we're at the last key, set the value
if (i === keys.length - 1) {
current[key] = value;
Expand Down