Skip to content

Commit 9cdfec4

Browse files
MVrachevCosmin Cojocar
authored andcommitted
Change test
I thought that an example where the user inputs a URL is more realistic. Because if your operating system is already hacked then you are already screwed. Signed-off-by: Martin Vrachev <[email protected]>
1 parent 8048b15 commit 9cdfec4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

testutils/source.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,14 @@ import (
323323
"io/ioutil"
324324
"fmt"
325325
"os"
326+
"bufio"
326327
)
327328
func main() {
328-
url := os.Getenv("tainted_url")
329+
in := bufio.NewReader(os.Stdin)
330+
url, err := in.ReadString('\n')
331+
if err != nil {
332+
panic(err)
333+
}
329334
resp, err := http.Get(url)
330335
if err != nil {
331336
panic(err)

0 commit comments

Comments
 (0)