Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e697eb8

Browse filesBrowse files
Only listen on 127.0.0.1 not all interfaces
This is a security risk, because you are exposing your application to other devices on your network if your device has no firewall configured. More importantly though it allows root free running of symfony and on macOS you will no longer get an annoying popup to allow incoming connections.
1 parent bf40c88 commit e697eb8
Copy full SHA for e697eb8

File tree

1 file changed

+1
-7
lines changed
Filter options

1 file changed

+1
-7
lines changed

‎local/process/listener.go

Copy file name to clipboardExpand all lines: local/process/listener.go
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,9 @@ func CreateListener(port, preferredPort int) (net.Listener, int, error) {
3939
max = 1
4040
}
4141
for {
42-
// we really want to test availability on 127.0.0.1
4342
ln, err = net.Listen("tcp", "127.0.0.1:"+strconv.Itoa(tryPort))
4443
if err == nil {
45-
ln.Close()
46-
// but then, we want to listen to as many local IP's as possible
47-
ln, err = net.Listen("tcp", ":"+strconv.Itoa(tryPort))
48-
if err == nil {
49-
break
50-
}
44+
break
5145
}
5246
if port > 0 {
5347
return nil, 0, errors.Wrapf(err, "unable to listen on port %d", port)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.