kwin commented on a change in pull request #4:
URL: 
https://github.com/apache/sling-org-apache-sling-security/pull/4#discussion_r782959317



##########
File path: src/main/java/org/apache/sling/security/impl/ReferrerFilter.java
##########
@@ -383,6 +383,10 @@ boolean isValidRequest(final HttpServletRequest request) {
         if ( referrer.indexOf(":/") == - 1 ) {
             return true;
         }
+        //invalid referrer
+        if("?://".equals(referrer)){

Review comment:
       You can probably just improve the if condition in line 346

##########
File path: src/main/java/org/apache/sling/security/impl/ReferrerFilter.java
##########
@@ -383,6 +383,10 @@ boolean isValidRequest(final HttpServletRequest request) {
         if ( referrer.indexOf(":/") == - 1 ) {
             return true;
         }
+        //invalid referrer
+        if("?://".equals(referrer)){

Review comment:
       let us rather improve getHost() as there might be more invalid referrer 
hosts




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to