Changeset dffd441


Ignore:
Timestamp:
Nov 28, 2015 6:53:40 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
513e1b9
Parents:
87fa1cb
Message:

SAM: Allow backslash escapes in parser (tickets #1325, #1488)
remove unneeded escape char in other parsers

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/sam/java/src/net/i2p/sam/SAMUtils.java

    r87fa1cb rdffd441  
    181181     *  PONG any   thing   goes
    182182     *
    183      *  No escaping of '"' or anything else is allowed or defined
     183     *  Escaping is allowed with a backslash, e.g. \"
    184184     *  No spaces before or after '=' allowed
    185185     *  Keys may not be quoted
    186      *  COMMAND and OPCODE may not have '='
     186     *  COMMAND, OPCODE, and keys may not have '=' or whitespace unless escaped
    187187     *  Duplicate keys not allowed
    188188     *</pre>
     
    275275                    break;
    276276
     277                case '\\':
     278                    if (++i >= length)
     279                        throw new SAMException("Unterminated escape");
     280                    c = args.charAt(i);
     281                    // fall through...
     282
    277283                default:
    278284                    buf.append(c);
  • core/java/src/net/i2p/util/EepGet.java

    r87fa1cb rdffd441  
    15211521        for (int i = 0; i < data.length; i++) {
    15221522            switch (data[i]) {
    1523                 case '\"':
     1523                case '"':
    15241524                    if (isQuoted) {
    15251525                        // keys never quoted
  • router/java/src/net/i2p/router/startup/LoadClientAppsJob.java

    r87fa1cb rdffd441  
    124124                switch (data[i]) {
    125125                    case '\'':
    126                     case '\"':
     126                    case '"':
    127127                        if (isQuoted) {
    128128                            String str = buf.toString().trim();
Note: See TracChangeset for help on using the changeset viewer.