You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by ar...@apache.org on 2023/06/14 04:48:56 UTC

[daffodil-vscode] 01/01: Bind the debug server to the loopback interface.

This is an automated email from the ASF dual-hosted git repository.

arosien pushed a commit to branch issue/658/bind-to-loopback-interface
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git

commit 8bf5ddf11614b221cd39970d64a2bcaa9da0b86d
Author: Adam Rosien <ad...@rosien.net>
AuthorDate: Tue Jun 13 21:47:09 2023 -0700

    Bind the debug server to the loopback interface.
    
    A.k.a., 127.0.0.1. We think 0.0.0.0 is used by default, and want
    to use a more secure local interface.
    
    Fixes #658.
---
 .../core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala b/server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala
index d46459e..6016c61 100644
--- a/server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala
+++ b/server/core/src/main/scala/org.apache.daffodil.debugger.dap/DAPodil.scala
@@ -454,7 +454,7 @@ object DAPodil extends IOApp {
 
       state <- Ref[IO].of[State](State.Uninitialized)
 
-      address = new InetSocketAddress(options.listenPort)
+      address = new InetSocketAddress(InetAddress.getLoopbackAddress, options.listenPort)
       serverSocket = {
         val ss = new ServerSocket(address.getPort, 1, address.getAddress)
         ss.setSoTimeout(options.listenTimeout.toMillis.toInt)