Skip to content

Commit

Permalink
Add link to shellshock as a warning (#9)
Browse files Browse the repository at this point in the history
* Add link to shellshock as a warning

* fix lint
  • Loading branch information
ldemailly authored Nov 8, 2023
1 parent 95f1f47 commit 9cfa78f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion env.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ func CamelCaseToLowerKebabCase(s string) string {

// Intermediate result list from StructToEnvVars(), both the Key and QuotedValue
// must be shell safe/non adversarial as they are emitted as is by String() with = in between.
// Using StructToEnvVars produces safe values even with adversarial input (length notwithstanding).
// Using StructToEnvVars produces safe values even with adversarial input (length and future
// reoccurence of bugs like https://en.wikipedia.org/wiki/Shellshock_(software_bug) notwithstanding)
// So avoid or scrub external values if possible (or use []byte type which base64 encodes the values).
type KeyValue struct {
Key string // Must be safe (is when coming from Go struct names but could be bad with env:).
QuotedValue string // (Must be) Already quoted/escaped.
Expand Down

0 comments on commit 9cfa78f

Please sign in to comment.