File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
portal-impl/src/com/liferay/portal/servlet Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ protected void doService(
307307 if (cacheEnabled && (modulePathsString != null ) &&
308308 !PropsValues .COMBO_CHECK_TIMESTAMP ) {
309309
310- if (PropsValues . COMBO_MAX_FILES != - 1 ) {
310+ if (modulePaths . length <= PropsValues . COMBO_MAX_FILES ) {
311311 int totalFilesCount = 0 ;
312312
313313 List <String > keys = _bytesArrayPortalCache .getKeys ();
@@ -323,6 +323,21 @@ protected void doService(
323323 }
324324 }
325325 }
326+ else {
327+ httpServletResponse .setHeader (
328+ HttpHeaders .CACHE_CONTROL ,
329+ HttpHeaders .CACHE_CONTROL_NO_CACHE_VALUE );
330+
331+ httpServletResponse .setStatus (
332+ HttpServletResponse .SC_BAD_REQUEST );
333+
334+ if (_log .isWarnEnabled ()) {
335+ _log .warn (
336+ "ComboServlet request exceeded maximum file count" )
337+ }
338+
339+ return ;
340+ }
326341
327342 _bytesArrayPortalCache .put (modulePathsString , bytesArray );
328343 }
You can’t perform that action at this time.
0 commit comments