roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shutra (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ROL-1925) Patch for the bug of OpenID only authentication
Date Tue, 14 Jun 2011 03:43:48 GMT

     [ https://issues.apache.org/jira/browse/ROL-1925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shutra updated ROL-1925:
------------------------

    Description: 
1. Fix the javascript error in Register page:
错误: document.register['bean.passwordText'] is undefined
源文件:https://example.com/roller/roller-ui/register.rol;jsessionid=043E3D9D1D765A9BD3976074DC56670C
行:1062

2. Generate a random string for the non-nullable passphrase field.

3. Override lookupRealm method of OpenIDAuthenticationProcessingFilter in spring-security-openid-2.0.5
to ignore the issue about appending wrong port to the url, for example, it may append "80"
to an url with https scheme.

4. Use openid_identifier as the html form field to match the openid spec, and ignore duplicate
ID "j_username" while using hybrid authentication methods. Enhanced the function: restoring
username from cookie.

5. svn rm some .classpath .project .settings files

6. orgnized the spring dependencies

The patch file is attached.

  was:
1. Fix the javascript error in Register page:
错误: document.register['bean.passwordText'] is undefined
源文件:https://example.com/roller/roller-ui/register.rol;jsessionid=043E3D9D1D765A9BD3976074DC56670C
行:1062

2. Generate a random string for the non-nullable passphrase field.

3. Override lookupRealm method of OpenIDAuthenticationProcessingFilter in spring-security-openid-2.0.5
to ignore the issue about appending wrong port to the url, for example, it may append "80"
to an url with https scheme.

4. Use openid_identifier as the html form field to match the openid spec, and ignore duplicate
ID "j_username" while using hybrid authentication methods. Enhanced the function: restoring
username from cookie.

5. svn rm some .classpath .project .settings files

6. orgnized the spring dependencies

Patch:
Index: roller-core/.classpath
===================================================================
--- roller-core/.classpath	(revision 1132878)
+++ roller-core/.classpath	(working copy)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
Index: roller-core/.project
===================================================================
--- roller-core/.project	(revision 1132878)
+++ roller-core/.project	(working copy)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>roller-core</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.maven.ide.eclipse.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.maven.ide.eclipse.maven2Nature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>
Index: roller-core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- roller-core/.settings/org.eclipse.jdt.core.prefs	(revision 1132878)
+++ roller-core/.settings/org.eclipse.jdt.core.prefs	(working copy)
@@ -1,9 +0,0 @@
-#Sun Mar 06 09:07:40 EST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.5
Index: roller-core/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- roller-core/.settings/org.eclipse.wst.common.project.facet.core.xml	(revision 1132878)
+++ roller-core/.settings/org.eclipse.wst.common.project.facet.core.xml	(working copy)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
-  <installed facet="java" version="1.5"/>
-  <installed facet="jst.utility" version="1.0"/>
-</faceted-project>
Index: roller-core/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- roller-core/.settings/org.maven.ide.eclipse.prefs	(revision 1132878)
+++ roller-core/.settings/org.maven.ide.eclipse.prefs	(working copy)
@@ -1,9 +0,0 @@
-#Sat Feb 27 08:50:48 EST 2010
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
Index: roller-core/.settings/org.eclipse.wst.common.component
===================================================================
--- roller-core/.settings/org.eclipse.wst.common.component	(revision 1132878)
+++ roller-core/.settings/org.eclipse.wst.common.component	(working copy)
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-modules id="moduleCoreId" project-version="1.5.0">
-    <wb-module deploy-name="roller-core">
-        <wb-resource deploy-path="/" source-path="/src/main/java"/>
-    </wb-module>
-</project-modules>
Index: weblogger-web/.classpath
===================================================================
--- weblogger-web/.classpath	(revision 1132878)
+++ weblogger-web/.classpath	(working copy)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
Index: weblogger-web/.project
===================================================================
--- weblogger-web/.project	(revision 1132878)
+++ weblogger-web/.project	(working copy)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>roller-weblogger-web</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.maven.ide.eclipse.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.maven.ide.eclipse.maven2Nature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>
Index: weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Register.java
===================================================================
--- weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Register.java
(revision 1132878)
+++ weblogger-web/src/main/java/org/apache/roller/weblogger/ui/struts2/core/Register.java
(working copy)
@@ -22,6 +22,7 @@
 import java.util.UUID;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.lang.CharSetUtils;
+import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -362,6 +363,13 @@
             }
         }
         
+        // User.password does not allow null, so generate one
+        if (getOpenIdConfiguration().equals("only")) {
+            String randomString = RandomStringUtils.randomAlphanumeric(255);
+            getBean().setPasswordText(randomString);
+            getBean().setPasswordConfirm(randomString);
+        }
+        
         // check that passwords match 
         if (!getBean().getPasswordText().equals(getBean().getPasswordConfirm())) {
             addError("Register.error.passowordMismatch");
Index: weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java
===================================================================
--- weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java
(revision 1132878)
+++ weblogger-web/src/main/java/org/apache/roller/weblogger/ui/core/filters/CustomOpenIDAuthenticationProcessingFilter.java
(working copy)
@@ -18,6 +18,9 @@
 
 package org.apache.roller.weblogger.ui.core.filters;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
 import javax.servlet.Filter;
 import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.logging.Log;
@@ -74,4 +77,34 @@
         }
         return auth;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected String lookupRealm(String returnToUrl) {
+
+        String mapping = (String) getRealmMapping().get(returnToUrl);
+
+        if (mapping == null) {
+            try {
+                URL url = new URL(returnToUrl);
+                int port = url.getPort();
+
+                StringBuffer realmBuffer = new StringBuffer(returnToUrl.length())
+                        .append(url.getProtocol())
+                        .append("://")
+                        .append(url.getHost());
+                if (port != -1) {
+                    realmBuffer.append(":").append(port);
+                }
+                realmBuffer.append("/");
+                mapping = realmBuffer.toString();
+            } catch (MalformedURLException e) {
+                log.warn("returnToUrl was not a valid URL: [" + returnToUrl + "]", e);
+            }
+        }
+
+        return mapping;
+    }
 }
Index: weblogger-web/pom.xml
===================================================================
--- weblogger-web/pom.xml	(revision 1132878)
+++ weblogger-web/pom.xml	(working copy)
@@ -196,13 +196,6 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-web</artifactId>
-            <version>2.5.6</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>aopalliance</groupId>
-                    <artifactId>aopalliance</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
@@ -214,49 +207,26 @@
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
-            <version>2.0.5.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-support</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-openid</artifactId>
-            <version>2.0.5.RELEASE</version>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-taglibs</artifactId>
-            <version>2.0.5.RELEASE</version>
         </dependency>
 
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-acl</artifactId>
-            <version>2.0.5.RELEASE</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework</groupId>
-                    <artifactId>spring-jdbc</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-dao</artifactId>
-            <version>2.0.6</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>aopalliance</groupId>
-                    <artifactId>aopalliance</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
 
         <!-- OpenID deps -->
@@ -296,7 +266,8 @@
         <dependency>
             <groupId>org.openid4java</groupId>
             <artifactId>openid4java-consumer</artifactId>
-            <version>0.9.5</version>
+            <version>0.9.6</version>
+            <type>pom</type>
         </dependency>
 
         <dependency>
Index: weblogger-webapp/.classpath
===================================================================
--- weblogger-webapp/.classpath	(revision 1132878)
+++ weblogger-webapp/.classpath	(working copy)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry combineaccessrules="false" kind="src" path="/roller-weblogger-web"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
-		<attributes>
-			<attribute name="owner.project.facets" value="java"/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
Index: weblogger-webapp/.project
===================================================================
--- weblogger-webapp/.project	(revision 1132878)
+++ weblogger-webapp/.project	(working copy)
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>roller-weblogger-webapp</name>
-	<comment></comment>
-	<projects>
-		<project>roller_trunk</project>
-		<project>roller-core</project>
-		<project>roller-planet-business</project>
-		<project>roller-weblogger-business</project>
-		<project>roller-weblogger-web</project>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<triggers>full,incremental,</triggers>
-			<arguments>
-				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.maven.ide.eclipse.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.maven.ide.eclipse.maven2Nature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
-	</natures>
-</projectDescription>
Index: weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Register.jsp
===================================================================
--- weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Register.jsp	(revision 1132878)
+++ weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Register.jsp	(working copy)
@@ -101,6 +101,7 @@
         </s:if>
         <s:else>
             <s:hidden name="bean.password" />
+            <s:hidden name="bean.passwordText" />
             <s:hidden name="bean.passwordConfirm" />
         </s:else>
     
Index: weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Login.jsp
===================================================================
--- weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Login.jsp	(revision 1132878)
+++ weblogger-webapp/src/main/webapp/WEB-INF/jsps/core/Login.jsp	(working copy)
@@ -40,13 +40,13 @@
     
     <form method="post" id="loginOpenIDForm"       
           action="/roller/roller_j_openid_security_check"      
-          onsubmit="saveUsername(this)">      
+          onsubmit="saveOpenidIdentifier(this)">      
         <!-- action="<c:url value='roller_j_openid_security_check'/>"  -->
         <table width="80%">
             <tr>
                 <td width="20%" align="right"><s:text name="loginPage.openID" /></td>
                 <td width="80%">
-                    <input type="text" name="j_username" id="j_username" class="f_openid_identifier"
size="40" maxlength="255" />
+                    <input type="text" name="openid_identifier" id="openid_identifier"
class="f_openid_identifier" size="40" maxlength="255" />
                 </td>
             </tr>    
             <tr>
@@ -114,17 +114,46 @@
     </form>
 </s:if>
 
-
 <script type="text/javascript">
 <!--
+<s:if test="openIdConfiguration != 'disabled'">
+function focusToOpenidForm() {
+    return (document.getElementById && document.getElementById("j_username") ===
null) ||
+        getCookie("favorite_authentication_method") !== "username";
+}
+
+if (document.getElementById) {
+    if (document.getElementById && getCookie("openid_identifier") !== null) {
+        document.getElementById("openid_identifier").value = getCookie("openid_identifier");
+    }
+    if (focusToOpenidForm()) {
+        document.getElementById("openid_identifier").focus();
+    }
+}
+
+function saveOpenidIdentifier(theForm) {
+    var expires = new Date();
+    expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx
30 days.
+    setCookie("openid_identifier",theForm.openid_identifier.value,expires);
+    setCookie("favorite_authentication_method", "openid");
+}
+</s:if>
+
+<s:if test="openIdConfiguration != 'only'">
+function focusToUsernamePasswordForm() {
+    return (document.getElementById && document.getElementById("openid_identifier")
=== null) ||
+        getCookie("favorite_authentication_method") === "username";
+}
 
 if (document.getElementById) {
     if (getCookie("username") != null) {
         if (document.getElementById) {
             document.getElementById("j_username").value = getCookie("username");
-            document.getElementById("j_password").focus();
+            if (focusToUsernamePasswordForm()) {
+                document.getElementById("j_password").focus();
+            }
         }
-    } else {
+    } else if (focusToUsernamePasswordForm()) {
         document.getElementById("j_username").focus();
     }
 }
@@ -133,6 +162,8 @@
     var expires = new Date();
     expires.setTime(expires.getTime() + 24 * 30 * 60 * 60 * 1000); // sets it for approx
30 days.
     setCookie("username",theForm.j_username.value,expires);
+    setCookie("favorite_authentication_method", "username");
 }
+</s:if>
 //-->
-</script>
+</script>
\ No newline at end of file
Index: weblogger-webapp/src/main/webapp/WEB-INF/security.xml
===================================================================
--- weblogger-webapp/src/main/webapp/WEB-INF/security.xml	(revision 1132878)
+++ weblogger-webapp/src/main/webapp/WEB-INF/security.xml	(working copy)
@@ -80,6 +80,7 @@
         <beans:property name="userDetailsService" ref="rollerUserService"/>
     </beans:bean>
     <beans:bean id="openidAuthenticationProcessingFilter" class="org.apache.roller.weblogger.ui.core.filters.CustomOpenIDAuthenticationProcessingFilter">
+        <beans:property name="claimedIdentityFieldName" value="openid_identifier"/>
         <beans:property name="defaultTargetUrl" value="/roller-ui/menu.rol"/>
         <beans:property name="filterProcessesUrl" value="/roller_j_openid_security_check"/>
         <beans:property name="exceptionMappings">
Index: weblogger-webapp/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- weblogger-webapp/.settings/org.eclipse.jdt.core.prefs	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.jdt.core.prefs	(working copy)
@@ -1,9 +0,0 @@
-#Sun Jan 30 08:49:32 EST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
Index: weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name	(working copy)
@@ -1 +0,0 @@
-Window
\ No newline at end of file
Index: weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container	(working copy)
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Index: weblogger-webapp/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- weblogger-webapp/.settings/org.eclipse.wst.common.project.facet.core.xml	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.wst.common.project.facet.core.xml	(working copy)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
-  <fixed facet="wst.jsdt.web"/>
-  <installed facet="java" version="1.6"/>
-  <installed facet="wst.jsdt.web" version="1.0"/>
-  <installed facet="jst.web" version="2.5"/>
-</faceted-project>
Index: weblogger-webapp/.settings/org.eclipse.wst.ws.service.policy.prefs
===================================================================
--- weblogger-webapp/.settings/org.eclipse.wst.ws.service.policy.prefs	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.wst.ws.service.policy.prefs	(working copy)
@@ -1,3 +0,0 @@
-#Sun Mar 13 13:24:54 EDT 2011
-eclipse.preferences.version=1
-org.eclipse.wst.ws.service.policy.projectEnabled=false
Index: weblogger-webapp/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- weblogger-webapp/.settings/org.maven.ide.eclipse.prefs	(revision 1132878)
+++ weblogger-webapp/.settings/org.maven.ide.eclipse.prefs	(working copy)
@@ -1,9 +0,0 @@
-#Sun Oct 24 10:57:02 EDT 2010
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
Index: weblogger-webapp/.settings/org.eclipse.wst.common.component
===================================================================
--- weblogger-webapp/.settings/org.eclipse.wst.common.component	(revision 1132878)
+++ weblogger-webapp/.settings/org.eclipse.wst.common.component	(working copy)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-modules id="moduleCoreId" project-version="1.5.0">
-    <wb-module deploy-name="${module}">
-        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
-        <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
-        <property name="context-root" value="roller"/>
-        <property name="java-output-path" value="/roller-weblogger-webapp/target/classes"/>
       
-    </wb-module>
-</project-modules>
Index: pom.xml
===================================================================
--- pom.xml	(revision 1132878)
+++ pom.xml	(working copy)
@@ -30,6 +30,7 @@
         <roller.version>5.0.0</roller.version>
         <!-- avoid CLOB/BLOB error in all later versions of Derby -->
         <derby.version>10.1.3.1</derby.version>
+        <spring.version>2.0.6.RELEASE</spring.version>
     </properties>
 
     <modules>
@@ -225,6 +226,74 @@
                 <scope>compile</scope>
             </dependency>
 
+            <!-- spring deps -->
+
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-dao</artifactId>
+                <version>2.0.6</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>aopalliance</groupId>
+                        <artifactId>aopalliance</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-web</artifactId>
+                <version>2.5.6</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>aopalliance</groupId>
+                        <artifactId>aopalliance</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-core</artifactId>
+                <version>${spring.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-support</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-openid</artifactId>
+                <version>${spring.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.openid4java</groupId>
+                        <artifactId>openid4java</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-taglibs</artifactId>
+                <version>${spring.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework.security</groupId>
+                <artifactId>spring-security-acl</artifactId>
+                <version>${spring.version}</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>org.springframework</groupId>
+                        <artifactId>spring-jdbc</artifactId>
+                    </exclusion>
+                </exclusions>
+            </dependency>
+
             <!-- web deps -->
 
             <dependency>
Index: weblogger-business/.classpath
===================================================================
--- weblogger-business/.classpath	(revision 1132878)
+++ weblogger-business/.classpath	(working copy)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" including="**/*.java" kind="src" output="target/classes"
path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
Index: weblogger-business/.project
===================================================================
--- weblogger-business/.project	(revision 1132878)
+++ weblogger-business/.project	(working copy)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>roller-weblogger-business</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.maven.ide.eclipse.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.maven.ide.eclipse.maven2Nature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>
Index: planet-business/.classpath
===================================================================
--- planet-business/.classpath	(revision 1132878)
+++ planet-business/.classpath	(working copy)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
-	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
-	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
-		<attributes>
-			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
-		</attributes>
-	</classpathentry>
-	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="target/classes"/>
-</classpath>
Index: planet-business/.project
===================================================================
--- planet-business/.project	(revision 1132878)
+++ planet-business/.project	(working copy)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>roller-planet-business</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.wst.common.project.facet.core.builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.maven.ide.eclipse.maven2Builder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.wst.validation.validationbuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
-		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-		<nature>org.maven.ide.eclipse.maven2Nature</nature>
-		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
-	</natures>
-</projectDescription>



> Patch for the bug of OpenID only authentication
> -----------------------------------------------
>
>                 Key: ROL-1925
>                 URL: https://issues.apache.org/jira/browse/ROL-1925
>             Project: Roller
>          Issue Type: Bug
>          Components: Authentication, Roles and Access Controls
>    Affects Versions: 5.0
>            Reporter: Shutra
>            Assignee: Roller Unassigned
>              Labels: patch
>             Fix For: 5.0
>
>         Attachments: roller-openid-only.patch
>
>
> 1. Fix the javascript error in Register page:
> 错误: document.register['bean.passwordText'] is undefined
> 源文件:https://example.com/roller/roller-ui/register.rol;jsessionid=043E3D9D1D765A9BD3976074DC56670C
> 行:1062
> 2. Generate a random string for the non-nullable passphrase field.
> 3. Override lookupRealm method of OpenIDAuthenticationProcessingFilter in spring-security-openid-2.0.5
to ignore the issue about appending wrong port to the url, for example, it may append "80"
to an url with https scheme.
> 4. Use openid_identifier as the html form field to match the openid spec, and ignore
duplicate ID "j_username" while using hybrid authentication methods. Enhanced the function:
restoring username from cookie.
> 5. svn rm some .classpath .project .settings files
> 6. orgnized the spring dependencies
> The patch file is attached.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message