use of org.dbflute.helper.message.ExceptionMessageBuilder in project fess by codelibs.
the class FessMultipartRequestHandler method throwTooLongBoundarySizeException.
protected void throwTooLongBoundarySizeException(final String contentType, final int boundarySize, final int limitSize) {
final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
br.addNotice("Too long boundary size so treats it as 404.");
br.addItem("Advice");
br.addElement("Against for JVN14876762.");
br.addElement("Boundary size is limited by Framework.");
br.addElement("Too long boundary is treated as 404 because it's thought of as attack.");
br.addElement("");
br.addElement("While, you can override the boundary limit size");
br.addElement(" in " + FessMultipartRequestHandler.class.getSimpleName() + ".");
br.addItem("Content Type");
br.addElement(contentType);
br.addItem("Boundary Size");
br.addElement(boundarySize);
br.addItem("Limit Size");
br.addElement(limitSize);
final String msg = br.buildExceptionMessage();
// heavy attack!? so give no page to tell wasted action
throw new Forced404NotFoundException(msg, UserMessages.empty());
}
Aggregations