这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public void destroy() {
*/
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
String requestURI = ((HttpServletRequest) request).getRequestURI();
HttpServletRequest httpRequest = (HttpServletRequest) request;
String requestURI = httpRequest.getRequestURI().substring(httpRequest.getContextPath().length());

if (Context.isAuthenticated()
&& new UserProperties(Context.getAuthenticatedUser().getUserProperties()).isSupposedToChangePassword()
Expand All @@ -65,10 +66,13 @@ && shouldNotAllowAccessToUrl(requestURI)) {
* Method to check if the request url is an excluded url.
*
* @param requestURI
* @param excludeURL
* @return
*/
private boolean shouldNotAllowAccessToUrl(String requestURI) {
// /ws is reserved
if (requestURI.startsWith("/ws")) {
return false;
}

for (String url : excludedURLs) {
if (requestURI.endsWith(url)) {
Expand Down
Loading