REBOL3 tracker
  0.9.12 beta
Ticket #0001883 User: anonymous

Project:



rss
TypeWish Statusproblem Date5-May-2011 12:24
Versionalpha 111 CategoryDatatype Submitted byBrianH
PlatformAll Severityminor Prioritynormal

Summary DO set-path! should trigger an error
Description Calling DO with a set-word! or set-path! value doesn't do anything, and certainly doesn't set anything - nor should it, due to security issues. There really isn't a good reason to allow DOing such values. So it's good that DO set-word! triggers an error. However, DO set-path! doesn't trigger that error, it just returns the set-path! value, which makes it difficult to track down the bug of trying to DO a set-path! value.

I would like DO set-path! to trigger an invalid argument error. This would aid debugging greatly.
Example code
>> do quote a:
** Script error: invalid argument: a:
** Where: do
** Near: do quote a:

>> do quote a/1:
== a/1:  ; Should trigger that error too

Assigned ton/a Fixed in- Last Update7-Jan-2016 20:58


Comments
(0004253)
BrianH
20-Feb-2014 21:05

Fixed in https://github.com/rebol/rebol/pull/184
(0004680)
Ladislav
6-Jan-2016 06:15

"Calling DO with a set-word! or set-path! value doesn't do anything, and certainly doesn't set anything - nor should it, due to security issues." - Interesting, this is what I think: for a set-word assigned to a variable, e.g., as follows:

variable: first [a:]


, there are no security issues resolved by prevention of the explicit assignment using:

do :variable :some-value

Proof: even if the explicit assignment is prevented, it is possible to make the assignment implicitly:

do reduce [:variable quote :some-value]

What am I missing?
(0004685)
Ladislav
7-Jan-2016 20:56

"There really isn't a good reason to allow DOing such values." - that is not true, at least as far as I am concerned.

Date User Field Action Change
7-Jan-2016 20:58 ladislav Category Modified Error Handling => Datatype
7-Jan-2016 20:56 ladislav Comment : 0004685 Added -
7-Jan-2016 20:55 ladislav Type Modified Bug => Wish
6-Jan-2016 06:18 Ladislav Status Modified pending => problem
6-Jan-2016 06:17 Ladislav Comment : 0004680 Modified -
6-Jan-2016 06:15 Ladislav Comment : 0004680 Added -
20-Feb-2014 21:05 BrianH Comment : 0004253 Added -
20-Feb-2014 21:04 BrianH Description Modified -
20-Feb-2014 21:04 BrianH Code Modified -
20-Feb-2014 21:04 BrianH Status Modified submitted => pending
5-May-2011 12:24 BrianH Ticket Added -