瀏覽代碼

SEC-64: Correct operation with Orion Web Application Server. Patch thanks to Paul Brooks.

Ben Alex 20 年之前
父節點
當前提交
0d77abb9c1
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      core/src/main/java/org/acegisecurity/intercept/web/FilterInvocation.java

+ 9 - 3
core/src/main/java/org/acegisecurity/intercept/web/FilterInvocation.java

@@ -1,4 +1,4 @@
-/* Copyright 2004 Acegi Technology Pty Limited
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -114,8 +114,14 @@ public class FilterInvocation {
         String pathInfo = getHttpRequest().getPathInfo();
         String queryString = getHttpRequest().getQueryString();
 
-        return getHttpRequest().getServletPath()
-        + ((pathInfo == null) ? "" : pathInfo)
+        String uri = getHttpRequest().getServletPath();
+
+        if (uri == null) {
+            uri = getHttpRequest().getRequestURI();
+            uri = uri.substring(getHttpRequest().getContextPath().length());
+        }
+
+        return uri + ((pathInfo == null) ? "" : pathInfo)
         + ((queryString == null) ? "" : ("?" + queryString));
     }