veyron/services/wspr/wsprd: bind to localhost
Make wspr always bind to localhost to avoid sharing the proxy with unknown
external users. Without this, anyone can connect to the proxy and use its
veyron credentials for anything. Now, only local processes can connect.
Change-Id: I185335fd4a474483f5b19a2cb52c7017b970d568
diff --git a/services/wspr/wsprd/lib/wspr.go b/services/wspr/wsprd/lib/wspr.go
index 6ad3b17..a2952e3 100644
--- a/services/wspr/wsprd/lib/wspr.go
+++ b/services/wspr/wsprd/lib/wspr.go
@@ -827,7 +827,7 @@
pipe.start(w, r)
})
ctx.logger.VI(1).Infof("Listening on port %d.", ctx.port)
- httpErr := http.ListenAndServe(fmt.Sprintf(":%d", ctx.port), nil)
+ httpErr := http.ListenAndServe(fmt.Sprintf("127.0.0.1:%d", ctx.port), nil)
if httpErr != nil {
log.Fatalf("Failed to HTTP serve: %s", httpErr)
}