Skip to content

Commit

Permalink
Fixed referred loop problem in siteStore
Browse files Browse the repository at this point in the history
  • Loading branch information
milospp committed Jan 16, 2025
1 parent 318e285 commit 871b98e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
public class OperationController extends BaseEditController {

private static final Log log = LogFactory.getLog(OperationController.class.getName());
private static final List<String> ignoreReferers = Arrays.asList("/siteStyle", "/uploadImages");



public void doPost (HttpServletRequest request, HttpServletResponse response) {

Expand Down Expand Up @@ -81,6 +84,10 @@ public void doPost (HttpServletRequest request, HttpServletResponse response) {
// if we're canceling, we don't need to do anything
if (request.getParameter("_cancel") != null){
String referer = epo.getReferer();
boolean ignoreReferer = ignoreReferers.stream().anyMatch(referer::contains);
if (ignoreReferer) {
referer = null;
}
if (referer == null) {
try {
response.sendRedirect(defaultLandingPage);
Expand Down

0 comments on commit 871b98e

Please sign in to comment.