Changeset 9c35a55 for apps


Ignore:
Timestamp:
Jun 11, 2018 12:06:34 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
253c157
Parents:
a1bf2b8
Message:

enforce max family name length

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigFamilyHandler.java

    ra1bf2b8 r9c35a55  
    3535            } else if (family.contains("/") || family.contains("\\")) {
    3636                addFormError("Bad characters in Family: " + family);
     37            } else if (family.length() > 32) {
     38                // let's enforce some sanity
     39                addFormError("Family too long, 32 chars max: " + family);
    3740            } else if (_context.router().saveConfig(FamilyKeyCrypto.PROP_FAMILY_NAME, family.trim())) {
    3841                addFormNotice(_t("Configuration saved successfully."));
Note: See TracChangeset for help on using the changeset viewer.