Rewrite performed with this command:
sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
$(grep -lr 'code.google.com/p/go.' *)
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
This logs all successful handshakes and all requests to run code snippets;
it is not immediately obvious how to limit this to non-localhost hosts, or
to instances where publicly available playgrounds are allowed without resorting
to addition of a new global. The level of noise on the log should not be too
great.
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/112850043
Also fixes the following nits;
- literal IPv6 address handling
- URL host component handling in the case of a wildcard listen
- URL port component handling in the case of no port component in origin
Fixesgolang/go#8096.
LGTM=dan.kortschak, adg
R=adg, golang-codereviews, dan.kortschak
CC=golang-codereviews
https://golang.org/cl/102770046
This change allows code to be sent safely to a partially sandboxed playground using the Native Client environment.
Execution of non-Go code is blocked when the RunScripts is false to prevent inclusion of code that might escape by virtue of being under a different runtime environment.
Two options for communicating whether to prevent non-Go code were considered: as has been done here and alternatively, using a message field. The latter was not chosen to close that as an attack option.
Another will be follow that adds a -nacl flag to the present command to allow sandboxing of playground code in presentations.
See discussion here: https://groups.google.com/d/topic/golang-dev/Hy-7PBP-T4Q/
LGTM=adg
R=adg, dave
CC=golang-codereviews
https://golang.org/cl/74740045