Skip to content

Commit

Permalink
Fix code scanning alert no. 1: Prototype-polluting function
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
alex-w and github-advanced-security[bot] authored Sep 28, 2024
1 parent 3915b13 commit e762011
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/RemoteControl/webroot/js/globalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ extend = function() {
if ( (options = arguments[ i ]) != null ) {
// Extend the base object
for ( name in options ) {
// Skip special properties to prevent prototype pollution
if (name === "__proto__" || name === "constructor") {
continue;
}
src = target[ name ];
copy = options[ name ];

Expand Down

0 comments on commit e762011

Please sign in to comment.