]> git.codecow.com Git - libnemo.git/commitdiff
Restrict special object properties from rolodex names.
authorChris Duncan <chris@codecow.com>
Fri, 7 Aug 2026 21:19:33 +0000 (14:19 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 7 Aug 2026 21:19:33 +0000 (14:19 -0700)
src/lib/rolodex.ts

index 3e690e8055ca767cbc091a1860ea7a7b3fa010ec..9791ff5c6cd434ee0413b5858e33d4b96456ef74 100644 (file)
@@ -34,6 +34,9 @@ export class Rolodex {
                if (typeof name !== 'string') {
                        throw new Error('Name must be a string for rolodex entries')
                }
+               if (name === '__proto__' || name === '__defineGetter__') {
+                       throw new Error('Invalid name')
+               }
                if (name.slice(0, 5) === 'nano_' || name.slice(0, 4) === 'xrb_') {
                        throw new Error('Name cannot start with an address prefix')
                }