Changeset 6039f39


Ignore:
Timestamp:
Jul 20, 2009 5:29:25 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
c312fa8
Parents:
71d72b4
Message:

additional proxy.i2p defenses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java

    r71d72b4 r6039f39  
    831831            String filename = null;
    832832            try {
    833                 filename = targetRequest.substring(10, space);
     833                filename = targetRequest.substring(17, space); // "proxy.i2p/themes/".length
    834834            } catch (IndexOutOfBoundsException ioobe) {}
    835835            // theme hack
    836             if (filename.startsWith("themes/console/default/"))
     836            if (filename.startsWith("console/default/"))
    837837                filename = filename.replaceFirst("default", I2PAppContext.getGlobalContext().getProperty("routerconsole.theme", "light"));
    838             File file = new File(_errorDir, filename);
     838            File themesDir = new File(_errorDir, "themes");
     839            File file = new File(themesDir, filename);
    839840            if (file.exists() && !file.isDirectory()) {
    840841                String type;
     
    850851                    out.write(type.getBytes());
    851852                    out.write("\r\nCache-Control: max-age=86400\r\n\r\n".getBytes());
    852                     FileUtil.readFile(filename, _errorDir.getAbsolutePath(), out);
     853                    FileUtil.readFile(filename, themesDir.getAbsolutePath(), out);
    853854                    return;
    854855                } catch (IOException ioe) {}
Note: See TracChangeset for help on using the changeset viewer.