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

Confusing code example in Section 5: Untrusted Code #39

Open
angelikatyborska opened this issue Nov 29, 2022 · 1 comment
Open

Confusing code example in Section 5: Untrusted Code #39

angelikatyborska opened this issue Nov 29, 2022 · 1 comment
Labels
bug Something isn't working small adjustment For typos or small tweaks

Comments

@angelikatyborska
Copy link

angelikatyborska commented Nov 29, 2022

In Section 5: Untrusted Code there's this example that is suggested to be insecure:

name = Kino.Input.text("What's your name?")
textfield_value = Kino.Input.read(name)
{result, binding} = Code.eval_string("a", a: textfield_value)
"Hello, " <> result

We did this security training at my small team at work and none of us could figure out how to choose an input that would prove that this code is insecure. See screenshot for example. Is it possible that this example is not correct? Was it supposed to say Code.eval_string(textfield_value) instead? That would definitely be insecure.

Screenshot 2022-11-29 at 15 35 21

@houllette houllette added bug Something isn't working small adjustment For typos or small tweaks labels Nov 29, 2022
@houllette
Copy link
Collaborator

Oh goodness! Thank you for calling this out. In a mad dash to get content added I must've slipped in the more secure solution into the example - we will get this addressed in our next release 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working small adjustment For typos or small tweaks
Development

No branches or pull requests

2 participants