Ignore:
Timestamp:
2009-05-04T11:17:13+02:00 (16 years ago)
Author:
frederik
Message:

bugfix in remote control plugin to stop reading garbage after 1024 bytes

Location:
applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RemoteControlPreferences.java

    r13497 r14893  
    5353    }
    5454
    55     public boolean ok() {
     55    public void ok() {
    5656        Main.pref.put("remotecontrol.permission.load-data", permissionLoadData.isSelected());
    5757        Main.pref.put("remotecontrol.permission.change-selection", permissionChangeSelection.isSelected());
    5858        Main.pref.put("remotecontrol.permission.change-viewport", permissionChangeViewport.isSelected());
    5959        Main.pref.put("remotecontrol.always-confirm", alwaysAskUserConfirm.isSelected());
    60         return false;
    6160    }
    6261}
  • applications/editors/josm/plugins/remotecontrol/src/org/openstreetmap/josm/plugins/remotecontrol/RequestProcessor.java

    r13497 r14893  
    7575
    7676            StringBuffer requestLine = new StringBuffer();
    77             while (true)
     77            while (requestLine.length() < 1024)
    7878            {
    7979                int c = in.read();
     
    8585            String get = requestLine.toString();
    8686            StringTokenizer st = new StringTokenizer(get);
     87            if (!st.hasMoreTokens()) { sendError(out); return; }
    8788            String method = st.nextToken();
     89            if (!st.hasMoreTokens()) { sendError(out); return; }
    8890            String url = st.nextToken();
    8991
    90             if(!method.equals("GET")) {
     92            if (!method.equals("GET")) {
    9193                sendNotImplemented(out);
    9294                return;
Note: See TracChangeset for help on using the changeset viewer.