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

fix bug in wasi::environ_get, fix off by one error in env_size_get #476

Merged
merged 3 commits into from
May 30, 2019

Conversation

MarkMcCaskey
Copy link
Contributor

@MarkMcCaskey MarkMcCaskey commented May 30, 2019

adds --env flag (resolves #475)
fixes other wasi env bugs
adds wasi envvar test

@syrusakbary
Copy link
Member

That's a great finding.

I think it will be good to:

  • Add integration tests
  • Only allow part of the environment variables to leak via a new CLI option

println!("Env vars:");
for e in env_vars {
println!("{}", e);
}
Copy link
Member

@syrusakbary syrusakbary May 30, 2019

Choose a reason for hiding this comment

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

It might be useful to add case to retrieve a single env var when:

  • env var is present (such as DOG)
  • env var is not present (such as UNKNOWN)

@MarkMcCaskey
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request May 30, 2019
Copy link
Member

@syrusakbary syrusakbary left a comment

Choose a reason for hiding this comment

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

Looks great 👍

@MarkMcCaskey
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request May 30, 2019
476: fix bug in wasi::environ_get, fix off by one error in env_size_get r=MarkMcCaskey a=MarkMcCaskey

adds `--env` flag (resolves #475)
fixes other wasi env bugs
adds wasi envvar test

Co-authored-by: Mark McCaskey <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 30, 2019

@bors
Copy link
Contributor

bors bot commented May 30, 2019

@bors bors bot merged commit 6a9515d into master May 30, 2019
@bors bors bot deleted the fix/wasi-env branch May 30, 2019 19:45
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.

Ability to set environment variables
2 participants