reject bad solr requests

pull/1/head
Michael Peter Christen 12 years ago
parent 44e363f37f
commit c91c67c3cd

@ -144,6 +144,10 @@ public class select {
// check post
if (post == null) return null;
if (post.size() > 100) {
Log.logWarning("select", "rejected bad-formed search request with " + post.size() + " properties from " + header.refererHost());
return null; // prevent the worst hacks here...
}
sb.intermissionAllThreads(3000); // tell all threads to do nothing for a specific time
// get the ranking profile id

@ -112,6 +112,10 @@ public class serverObjects implements Serializable, Cloneable {
this.put(ACTION_AUTHENTICATE, ADMIN_AUTHENTICATE_MSG);
}
public int size() {
return this.map.toNamedList().size() / 2;
}
public void clear() {
this.map.getMap().clear();
}

Loading…
Cancel
Save