jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r1546727 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/attachment/ jspwiki-war/src/main/java/org/apache/wiki/auth/login/ jspwiki-war/src/main/java/org/apache/wiki/plugin/ jspwik...
Date Sat, 30 Nov 2013 13:09:37 GMT
Author: metskem
Date: Sat Nov 30 13:09:36 2013
New Revision: 1546727

URL: http://svn.apache.org/r1546727
Log:
2013-11-30  Harry Metske (metskem@apache.org)

       * 2.10.0-svn-49

       * JSPWIKI-805: more general support for X-Forwarded-For header

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentServlet.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/login/AnonymousLoginModule.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/IfPlugin.java
    jspwiki/trunk/jspwiki-war/src/main/webapp/Comment.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/Delete.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/Diff.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/Edit.jsp
    jspwiki/trunk/jspwiki-war/src/main/webapp/Rename.jsp

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Sat Nov 30 13:09:36 2013
@@ -1,3 +1,9 @@
+2013-11-30  Harry Metske (metskem@apache.org)
+
+       * 2.10.0-svn-49
+
+       * JSPWIKI-805: more general support for X-Forwarded-For header
+
 2013-11-28  Juan Pablo Santos (juanpablo AT apache DOT org)
 
        * 2.10.0-svn-48

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sat Nov 30 13:09:36
2013
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "48";
+    public static final String     BUILD         = "49";
     
     /**
      *  This is the generic version string you should use

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentServlet.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentServlet.java?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentServlet.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/attachment/AttachmentServlet.java
Sat Nov 30 13:09:36 2013
@@ -294,7 +294,7 @@ public class AttachmentServlet extends H
 
                 if(log.isDebugEnabled())
                 {
-                    msg = "Attachment "+att.getFileName()+" sent to "+req.getRemoteUser()+"
on "+req.getRemoteAddr();
+                    msg = "Attachment "+att.getFileName()+" sent to "+req.getRemoteUser()+"
on "+HttpUtil.getRemoteAddress(req);
                     log.debug( msg );
                 }
                 if( nextPage != null ) res.sendRedirect( nextPage );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/login/AnonymousLoginModule.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/login/AnonymousLoginModule.java?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/login/AnonymousLoginModule.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/login/AnonymousLoginModule.java
Sat Nov 30 13:09:36 2013
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpSession;
 import org.apache.log4j.Logger;
 
 import org.apache.wiki.auth.WikiPrincipal;
+import org.apache.wiki.util.HttpUtil;
 
 /**
  * <p>
@@ -79,7 +80,7 @@ public class AnonymousLoginModule extend
         {
             m_handler.handle( callbacks );
             HttpServletRequest request = hcb.getRequest();
-            WikiPrincipal ipAddr = new WikiPrincipal( request.getRemoteAddr() );
+            WikiPrincipal ipAddr = new WikiPrincipal( HttpUtil.getRemoteAddress(request)
);
             if ( log.isDebugEnabled() )
             {
                 HttpSession session = request.getSession( false );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/IfPlugin.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/IfPlugin.java?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/IfPlugin.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/IfPlugin.java Sat Nov 30
13:09:36 2013
@@ -28,6 +28,7 @@ import org.apache.wiki.WikiContext;
 import org.apache.wiki.WikiProvider;
 import org.apache.wiki.api.exceptions.PluginException;
 import org.apache.wiki.api.plugin.WikiPlugin;
+import org.apache.wiki.util.HttpUtil;
 import org.apache.wiki.util.TextUtil;
 
 /**
@@ -275,7 +276,7 @@ public class IfPlugin implements WikiPlu
                 }
             }
 
-            include |= ipaddrToCheck.equals( context.getHttpRequest().getRemoteAddr() ) ^
invert;
+            include |= ipaddrToCheck.equals( HttpUtil.getRemoteAddress(context.getHttpRequest())
) ^ invert;
         }
         return include;
     }

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/Comment.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/Comment.jsp?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/Comment.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/Comment.jsp Sat Nov 30 13:09:36 2013
@@ -20,6 +20,7 @@
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="java.util.*" %>
 <%@ page import="java.text.SimpleDateFormat" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
 <%@ page import="org.apache.wiki.*" %>
 <%@ page import="org.apache.wiki.api.exceptions.RedirectException" %>
 <%@ page import="org.apache.wiki.filters.SpamFilter" %>
@@ -129,7 +130,7 @@
 
     if( ok != null )
     {
-        log.info("Saving page "+pagereq+". User="+storedUser+", host="+request.getRemoteAddr()
);
+        log.info("Saving page "+pagereq+". User="+storedUser+", host="+HttpUtil.getRemoteAddress(request)
);
 
         //  Modifications are written here before actual saving
 
@@ -273,7 +274,7 @@
         return;
     }
 
-    log.info("Commenting page "+pagereq+". User="+request.getRemoteUser()+", host="+request.getRemoteAddr()
);
+    log.info("Commenting page "+pagereq+". User="+request.getRemoteUser()+", host="+HttpUtil.getRemoteAddress(request)
);
 
     //
     //  Determine and store the date the latest version was changed.  Since

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/Delete.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/Delete.jsp?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/Delete.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/Delete.jsp Sat Nov 30 13:09:36 2013
@@ -19,6 +19,7 @@
 
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
 <%@ page import="org.apache.wiki.tags.BreadcrumbsTag" %>
 <%@ page import="org.apache.wiki.tags.BreadcrumbsTag.FixedQueue" %>
 <%@ page import="java.util.*" %>
@@ -57,7 +58,7 @@
 
     if( deleteall != null )
     {
-        log.info("Deleting page "+pagereq+". User="+request.getRemoteUser()+", host="+request.getRemoteAddr()
);
+        log.info("Deleting page "+pagereq+". User="+request.getRemoteUser()+", host="+HttpUtil.getRemoteAddress(request)
);
 
         wiki.deletePage( pagereq );
 

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/Diff.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/Diff.jsp?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/Diff.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/Diff.jsp Sat Nov 30 13:09:36 2013
@@ -19,6 +19,7 @@
 
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
 <%@ page import="org.apache.wiki.util.*" %>
 <%@ page import="org.apache.wiki.tags.InsertDiffTag" %>
@@ -83,7 +84,7 @@
                               new Integer(ver2),
                               PageContext.REQUEST_SCOPE );
 
-    // log.debug("Request for page diff for '"+pagereq+"' from "+request.getRemoteAddr()+"
by "+request.getRemoteUser()+".  R1="+ver1+", R2="+ver2 );
+    // log.debug("Request for page diff for '"+pagereq+"' from "+HttpUtil.getRemoteAddress(request)+"
by "+request.getRemoteUser()+".  R1="+ver1+", R2="+ver2 );
 
     // Set the content type and include the response content
     response.setContentType("text/html; charset="+wiki.getContentEncoding() );

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/Edit.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/Edit.jsp?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/Edit.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/Edit.jsp Sat Nov 30 13:09:36 2013
@@ -20,6 +20,7 @@
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="java.util.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
 <%@ page import="org.apache.wiki.api.exceptions.RedirectException" %>
 <%@ page import="org.apache.wiki.filters.SpamFilter" %>
 <%@ page import="org.apache.wiki.htmltowiki.HtmlStringToWikiTranslator" %>
@@ -108,7 +109,7 @@
 
     if( ok != null || captcha != null )
     {
-        log.info("Saving page "+pagereq+". User="+user+", host="+request.getRemoteAddr()
);
+        log.info("Saving page "+pagereq+". User="+user+", host="+HttpUtil.getRemoteAddress(request)
);
 
         //
         //  Check for session expiry
@@ -260,7 +261,7 @@
 
     session.removeAttribute( EditorManager.REQ_EDITEDTEXT );
 
-    log.info("Editing page "+pagereq+". User="+user+", host="+request.getRemoteAddr() );
+    log.info("Editing page "+pagereq+". User="+user+", host="+HttpUtil.getRemoteAddress(request)
);
 
     //
     //  Determine and store the date the latest version was changed.  Since

Modified: jspwiki/trunk/jspwiki-war/src/main/webapp/Rename.jsp
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/webapp/Rename.jsp?rev=1546727&r1=1546726&r2=1546727&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/webapp/Rename.jsp (original)
+++ jspwiki/trunk/jspwiki-war/src/main/webapp/Rename.jsp Sat Nov 30 13:09:36 2013
@@ -19,6 +19,7 @@
 
 <%@ page import="org.apache.log4j.*" %>
 <%@ page import="org.apache.wiki.*" %>
+<%@ page import="org.apache.wiki.util.HttpUtil" %>
 <%@ page import="org.apache.wiki.api.exceptions.WikiException" %>
 <%@ page import="org.apache.wiki.preferences.Preferences" %>
 <%@ page import="org.apache.wiki.tags.BreadcrumbsTag" %>
@@ -52,7 +53,7 @@
         changeReferences = true;
     }
 
-    log.info("Page rename request for page '"+renameFrom+ "' to new name '"+renameTo+"' from
"+request.getRemoteAddr()+" by "+request.getRemoteUser() );
+    log.info("Page rename request for page '"+renameFrom+ "' to new name '"+renameTo+"' from
"+HttpUtil.getRemoteAddress(request)+" by "+request.getRemoteUser() );
 
     WikiSession wikiSession = wikiContext.getWikiSession();
     try



Mime
View raw message