You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
>> 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
"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?
Rebolbot commented on Jan 7, 2016:
Submitted by:Ladislav
"There really isn't a good reason to allow DOing such values."
That is not true, at least as far as I am concerned.
Submitted by: BrianH
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.
Imported from: CureCode [ Version: alpha 111 Type: Wish Platform: All Category: Datatype Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1883
Comments:
Submitted by: BrianH
Fixed in rebol/rebol#184
Submitted by: Ladislav
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:Proof: even if the explicit assignment is prevented, it is possible to make the assignment implicitly:
What am I missing?
Submitted by: Ladislav
That is not true, at least as far as I am concerned.
The text was updated successfully, but these errors were encountered: