I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 9c35a559 authored by zzz's avatar zzz
Browse files

enforce max family name length

parent a1bf2b86
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,9 @@ public class ConfigFamilyHandler extends FormHandler {
addFormError("Family already configured: " + family);
} else if (family.contains("/") || family.contains("\\")) {
addFormError("Bad characters in Family: " + family);
} else if (family.length() > 32) {
// let's enforce some sanity
addFormError("Family too long, 32 chars max: " + family);
} else if (_context.router().saveConfig(FamilyKeyCrypto.PROP_FAMILY_NAME, family.trim())) {
addFormNotice(_t("Configuration saved successfully."));
addFormError(_t("Restart required to take effect"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment