mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix safe mode authorizer callback to reject disallowed UDFs. Reported at [forum:/forumpost/07beac8056151b2f|Forum post 07beac8056151b2f].
FossilOrigin-Name: cefc032473ac5ad244c0b6402c541b2f76c0c65a041bda03bfbe7c0e2c11fac2
This commit is contained in:
@ -191,4 +191,16 @@ do_test shell2-1.4.7 {
|
||||
SELECT 'unclosed;
|
||||
^--- error here}}
|
||||
|
||||
# Verify that safe mode rejects certain UDFs
|
||||
# Reported at https://sqlite.org/forum/forumpost/07beac8056151b2f
|
||||
do_test shell2-1.4.8 {
|
||||
catchcmd "-safe :memory:" {
|
||||
SELECT edit('DoNotCare');}
|
||||
} {1 {line 2: cannot use the edit() function in safe mode}}
|
||||
do_test shell2-1.4.9 {
|
||||
catchcmd "-safe :memory:" {
|
||||
SELECT writefile('DoNotCare', x'');}
|
||||
} {1 {line 2: cannot use the writefile() function in safe mode}}
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user