Changeset 5179 in osm for applications


Ignore:
Timestamp:
2007-10-26T11:40:20+02:00 (17 years ago)
Author:
frederik
Message:

modified YWMS plugin HTTP server component to listen on localhost only to avoid external clients remote-controlling firefox

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ywms/src/org/openstreetmap/josm/plugins/ywms/HTTPServer.java

    r2264 r5179  
    55import java.net.Socket;
    66import java.net.SocketException;
     7import java.net.InetAddress;
    78
    89/**
     
    2930                super("YWMS HTTP Server");
    3031                this.setDaemon(true);
    31                 // Start the server socket with only 1 connection, because we can only start one firefox process
    32                 this.server = new ServerSocket(port, 1);
     32                // Start the server socket with only 1 connection, because we can
     33        // only start one firefox process. Also make sure we only listen
     34        // on the local interface so nobody from the outside can connect!
     35                this.server = new ServerSocket(port, 1,
     36            InetAddress.getByAddress(new byte[] { 127, 0, 0, 1 }));
    3337        }
    3438
Note: See TracChangeset for help on using the changeset viewer.