IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 9, 2021, 4:44:03 PM (5 years ago)
Author:
eugene
Message:

disallow unrestricted queries and add -all option to definebyquery commands and others which would generate very long results if allowed: camtool, chiptool, difftool, dqstatstool, faketool, pubtool, warptool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/difftool.c

    r40512 r41549  
    471471    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    472472    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     473    PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
    473474
    474475    psString query = pxDataGet("difftool_todiffskyfile.sql");
     
    478479    }
    479480
    480     if (psListLength(where->list)) {
     481    if (where && psListLength(where->list)) {
    481482        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
    482483        psStringAppend(&query, " AND %s", whereClause);
    483484        psFree(whereClause);
     485    } else {
     486      if (!all) {
     487        psError(PXTOOLS_ERR_SYS, false, "unrestricted query not allowed (try -all");
     488        return false;
     489      }
    484490    }
    485491    psFree(where);
Note: See TracChangeset for help on using the changeset viewer.