Skip to content

vrepl: fix arbitrary script execute (fix #13981) - #21818

Merged
spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fix_arbitrary_script_exec
Jul 8, 2024
Merged

spytheman merged 1 commit into
vlang:masterfrom
yuyi98:fix_arbitrary_script_exec

Conversation

@yuyi98

@yuyi98 yuyi98 commented Jul 7, 2024

Copy link
Copy Markdown
Member

This PR fix arbitrary script execute (fix #13981).

  • Fix arbitrary script execute.
  • Add test.
PS D:\Vlang\v> v
 ____    ____
 \   \  /   /  |  Welcome to the V REPL (for help with V itself, type  exit , then run  v help ).
  \   \/   /   |  Note: the REPL is highly experimental. For best V experience, use a text editor,
   \      /    |  save your code in a  main.v  file and execute:  v run main.v
    \    /     |  V 0.4.6 df18047 . Use  list  to see the accumulated program so far.
     \__/      |  Use Ctrl-C or  exit  to exit, or  help  to see other available commands.

>>> "text") exit(-1)
error: expression evaluated but not used
    5 | import math
    6 |
    7 | "text") exit(-1)
      | ~~~~~~
>>>

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman
spytheman merged commit bf23b2e into vlang:master Jul 8, 2024
@yuyi98
yuyi98 deleted the fix_arbitrary_script_exec branch July 8, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V REPL passes input directly into println, allowing arbitrary script execution

2 participants