You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:18:57 UTC

[sling-org-apache-sling-auth-form] 13/26: SLING-2165 Form based login failure should stay on the same login page to show the login error

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.auth.form-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-form.git

commit eccd8ebed4320ba54546e34f7afbe85080c46a57
Author: Eric Norman <en...@apache.org>
AuthorDate: Sat Nov 12 22:22:51 2011 +0000

    SLING-2165 Form based login failure should stay on the same login page to show the login error
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/auth/form@1201346 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                                             | 2 +-
 .../org/apache/sling/auth/form/impl/FormAuthenticationHandler.java  | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0c39734..74bb31b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,7 +98,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.auth.core</artifactId>
-            <version>1.0.4</version>
+            <version>1.0.7-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java b/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
index f18616b..4a2fbeb 100644
--- a/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
+++ b/src/main/java/org/apache/sling/auth/form/impl/FormAuthenticationHandler.java
@@ -353,6 +353,12 @@ public class FormAuthenticationHandler extends AbstractAuthenticationHandler {
             return false;
         }
 
+        //check the referer to see if the request is for this handler
+        if (!checkReferer(request, loginForm)) {
+        	//not for this handler, so return
+        	return false;
+        }
+        
         final String resource = setLoginResourceAttribute(request,
             request.getRequestURI());
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.