]> git.kaiwu.me - njs.git/commit
QuickJS: disabling eval() and Function() in qjs_new_context().
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 24 Jul 2024 23:30:10 +0000 (16:30 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 4 Sep 2024 00:58:54 +0000 (17:58 -0700)
commit8e02600da88bd70a2a4aff88e9bb38fbd849f9f3
tree942717c95b6b07a4b3ace295f9200c08f8cc68ef
parent65f1e8555e226f0072d69fd673d000639f6428db
QuickJS: disabling eval() and Function() in qjs_new_context().

This properly disables eval() after previous attempt in c773ebcaad
(0.8.5).  In QuickJS buint-in C level eval API, which is used by njs, is
linked to eval() in JS code. To disable only the JS function
manual modification of global object is required.
external/njs_shell.c
src/qjs.c
src/qjs.h