Changeset b2e1791


Ignore:
Timestamp:
Dec 8, 2014 2:12:00 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4f3244e
Parents:
57ac344
Message:

HTTP Proxy: Fix parsing of ECDSA address helper,
ignore '=' when comparing, reindent test

Files:
3 edited

Legend:

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

    r57ac344 rb2e1791  
    615615                                        String old = addressHelpers.putIfAbsent(destination.toLowerCase(Locale.US), ahelperKey);
    616616                                        ahelperNew = old == null;
    617                                         if((!ahelperNew) && !old.equals(ahelperKey)) {
     617                                        // inr address helper links without trailing '=', so omit from comparison
     618                                        if ((!ahelperNew) && !old.replace("=", "").equals(ahelperKey.replace("=", ""))) {
    618619                                            // Conflict: handle when URL reconstruction done
    619620                                            ahelperConflict = true;
     
    13891390                keystart = i + 1;
    13901391                valstart = -1;
    1391             } else if(c == '=') {
     1392            } else if (c == '=' && valstart < 0) {
    13921393                // end of key
    13931394                key = query.substring(keystart, i);
     
    13991400    /****
    14001401    private static String[] tests = {
    1401     "", "foo", "foo=bar", "&", "&=&", "===", "&&",
    1402     "i2paddresshelper=foo",
    1403     "i2paddresshelpe=foo",
    1404     "2paddresshelper=foo",
    1405     "i2paddresshelper=%66oo",
    1406     "%692paddresshelper=foo",
    1407     "i2paddresshelper=foo&a=b",
    1408     "a=b&i2paddresshelper=foo",
    1409     "a=b&i2paddresshelper&c=d",
    1410     "a=b&i2paddresshelper=foo&c=d",
    1411     "a=b;i2paddresshelper=foo;c=d",
    1412     "a=b&i2paddresshelper=foo&c"
     1402        "", "foo", "foo=bar", "&", "&=&", "===", "&&",
     1403        "i2paddresshelper=foo",
     1404        "i2paddresshelpe=foo",
     1405        "2paddresshelper=foo",
     1406        "i2paddresshelper=%66oo",
     1407        "%692paddresshelper=foo",
     1408        "i2paddresshelper=foo&a=b",
     1409        "a=b&i2paddresshelper=foo",
     1410        "a=b&i2paddresshelper&c=d",
     1411        "a=b&i2paddresshelper=foo&c=d",
     1412        "a=b;i2paddresshelper=foo;c=d",
     1413        "a=b&i2paddresshelper=foo&c",
     1414        "a=b&i2paddresshelper=foo==&c",
     1415        "a=b&i2paddresshelper=foo%3d%3d&c"
    14131416    };
    14141417
    14151418    public static void main(String[] args) {
    1416     for (int i = 0; i < tests.length; i++) {
    1417     String[] s = removeHelper(tests[i]);
    1418     if (s != null)
    1419     System.out.println("Test \"" + tests[i] + "\" q=\"" + s[0] + "\" h=\"" + s[1] + "\"");
    1420     else
    1421     System.out.println("Test \"" + tests[i] + "\" no match");
    1422     }
     1419        for (int i = 0; i < tests.length; i++) {
     1420            String[] s = removeHelper(tests[i]);
     1421            if (s != null)
     1422                System.out.println("Test \"" + tests[i] + "\" q=\"" + s[0] + "\" h=\"" + s[1] + "\"");
     1423            else
     1424                System.out.println("Test \"" + tests[i] + "\" no match");
     1425        }
    14231426    }
    14241427     ****/
  • history.txt

    r57ac344 rb2e1791  
     12014-12-08 zzz
     2 * HTTP Proxy: Fix parsing of ECDSA address helper
     3 * NetDB: Increase lookup throttle time
     4
    152014-12-05 zzz
    26Prop from i2p.i2p.zzz.test2:
  • router/java/src/net/i2p/router/RouterVersion.java

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