fixed parser extension deny list generation and usage

pull/1/head
Michael Peter Christen 13 years ago
parent 8bee1472c9
commit 2e5cd6a1b2

@ -61,6 +61,7 @@ public class ConfigParser {
}
}
env.setConfig(SwitchboardConstants.PARSER_MIME_DENY, TextParser.getDenyMime());
env.setConfig(SwitchboardConstants.PARSER_EXTENSIONS_DENY, TextParser.getDenyExtension());
}
}

@ -472,6 +472,7 @@ public final class TextParser {
}
public static void grantExtension(final String ext, final boolean grant) {
if (ext == null || ext.length() == 0) return;
if (grant) denyExtensionx.remove(ext); else denyExtensionx.put(ext, v);
}

@ -636,6 +636,7 @@ public final class Switchboard extends serverSwitch
// define a realtime parsable mimetype list
this.log.logConfig("Parser: Initializing Mime Type deny list");
TextParser.setDenyMime(getConfig(SwitchboardConstants.PARSER_MIME_DENY, ""));
TextParser.setDenyExtension(getConfig(SwitchboardConstants.PARSER_EXTENSIONS_DENY, ""));
// prepare a solr index profile switch list
final File solrBackupProfile = new File("defaults/solr.keys.list");

Loading…
Cancel
Save