Changeset 9df87ba


Ignore:
Timestamp:
Mar 13, 2010 8:33:48 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
52e2aaa, 697a9db
Parents:
116be93
Message:

partial fix for i2ptunnel nonce troubles

Files:
3 edited

Legend:

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

    r116be93 r9df87ba  
    4040    private int _tunnel;
    4141    private long _prevNonce;
     42    private long _prevNonce2;
    4243    private long _curNonce;
    4344    private long _nextNonce;
     45    /** deprecated unimplemented, now using routerconsole realm */
    4446    private String _passphrase;
    4547
     
    8082    public static final int STANDBY = 4;
    8183   
     84    /** deprecated unimplemented, now using routerconsole realm */
    8285    public static final String PROP_TUNNEL_PASSPHRASE = "i2ptunnel.passphrase";
    8386    static final String PROP_NONCE = IndexBean.class.getName() + ".nonce";
     87    static final String PROP_NONCE_OLD = PROP_NONCE + '2';
    8488    static final String CLIENT_NICKNAME = "shared clients";
    8589   
     
    97101        _curNonce = -1;
    98102        _prevNonce = -1;
     103        _prevNonce2 = -1;
    99104        try {
     105            String nonce2 = System.getProperty(PROP_NONCE_OLD);
     106            if (nonce2 != null)
     107                _prevNonce2 = Long.parseLong(nonce2);
    100108            String nonce = System.getProperty(PROP_NONCE);
    101             if (nonce != null)
     109            if (nonce != null) {
    102110                _prevNonce = Long.parseLong(nonce);
     111                System.setProperty(PROP_NONCE_OLD, nonce);
     112            }
    103113        } catch (NumberFormatException nfe) {}
    104114        _nextNonce = _context.random().nextLong();
     
    118128    }
    119129
     130    /** deprecated unimplemented, now using routerconsole realm */
    120131    public void setPassphrase(String phrase) {
    121132        _passphrase = phrase;
     
    135146    }
    136147   
     148    /** deprecated unimplemented, now using routerconsole realm */
    137149    private boolean validPassphrase(String proposed) {
    138150        if (proposed == null) return false;
     
    147159        if ( (_action == null) || (_action.trim().length() <= 0) || ("Cancel".equals(_action)))
    148160            return "";
    149         if ( (_prevNonce != _curNonce) && (!validPassphrase(_passphrase)) )
     161        if ( (_prevNonce != _curNonce) && (_prevNonce2 != _curNonce) && (!validPassphrase(_passphrase)) )
    150162            return "Invalid form submission, probably because you used the 'back' or 'reload' button on your browser. Please resubmit.";
    151163        if ("Stop all".equals(_action))
  • history.txt

    r116be93 r9df87ba  
     12010-03-013 zzz
     2    * Partial fix for i2ptunnel nonce troubles
     3
    142010-03-08 zzz
    25    * Floodfills: Increase max to 60 (was 28) and min to 45 (was 20)
  • router/java/src/net/i2p/router/RouterVersion.java

    r116be93 r9df87ba  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 10;
     21    public final static long BUILD = 11;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.