Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO set-path! should trigger an error #1883

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

DO set-path! should trigger an error #1883

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Test.written Type.wish

Comments

@Siskin-Bot
Copy link
Collaborator

Siskin-Bot commented Feb 15, 2020

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.

>> 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

Imported from: CureCode [ Version: alpha 111 Type: Wish Platform: All Category: Datatype Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1883

Comments:

Rebolbot commented on Feb 20, 2014:

Submitted by: BrianH

Fixed in rebol/rebol#184


Rebolbot commented on Jan 6, 2016:

Submitted by: Ladislav

"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.


Rebolbot mentioned this issue on Jan 22, 2016:
[Epic] DO word, path and set-path


Rebolbot added the Type.wish on Jan 12, 2016


Oldes added a commit to Oldes/Rebol3 that referenced this issue Jul 4, 2022
@Oldes Oldes added Test.written Oldes.resolved Bugs/wishes with Oldes' fixes/features labels Jul 4, 2022
@Oldes Oldes closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Oldes.resolved Bugs/wishes with Oldes' fixes/features Test.written Type.wish
Projects
None yet
Development

No branches or pull requests

2 participants