Skip to content

Hw web security#669

Open
AntonU91 wants to merge 4 commits intomate-academy:masterfrom
AntonU91:hw-web-security
Open

Hw web security#669
AntonU91 wants to merge 4 commits intomate-academy:masterfrom
AntonU91:hw-web-security

Conversation

@AntonU91
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@olekskov olekskov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

Comment on lines +34 to +42
if (userId == null && allowedUrls.contains(req.getServletPath())) {
chain.doFilter(req, resp);
return;
}
if (userId == null) {
resp.sendRedirect(req.getContextPath() + "/login");
return;
}
chain.doFilter(req, resp);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (userId == null && allowedUrls.contains(req.getServletPath())) {
chain.doFilter(req, resp);
return;
}
if (userId == null) {
resp.sendRedirect(req.getContextPath() + "/login");
return;
}
chain.doFilter(req, resp);
if (userId == null && ! allowedUrls.contains(req.getServletPath())) {
resp.sendRedirect(req.getContextPath() + "/login");
return;
}
chain.doFilter(req, resp);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants