Oved Ourfali has posted comments on this change.

Change subject: aaa: Intorduce filters
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.ovirt.org/#/c/28022/13/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/BasicAuthenticationFilter.java
File 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/BasicAuthenticationFilter.java:

Line 44:     public void doFilter(ServletRequest request, ServletResponse 
response, FilterChain chain) throws IOException,
Line 45:             ServletException {
Line 46:         HttpServletRequest req = (HttpServletRequest) request;
Line 47:         if (!FiltersHelper.isAuthenticated(req)) {
Line 48:             chain.doFilter(request, response);
aren't you doing the filter twice here?
This is the first time.
Line 49:             String headerValue = req.getHeader("Authorization");
Line 50:             if (headerValue != null && headerValue.startsWith("Basic 
")) {
Line 51:                 String[] creds =  new String(
Line 52:                         
Base64.decodeBase64(headerValue.substring("Basic".length())),


Line 54:                     ).split(":", 2);
Line 55:                 handleCredentials(request, creds);
Line 56:             }
Line 57:         }
Line 58:         chain.doFilter(request, response);
this is the second time.
Line 59:     }
Line 60: 
Line 61: 
Line 62:     private int getSeparator(String qualified) {


-- 
To view, visit http://gerrit.ovirt.org/28022
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5536d123b6407acf41b6946dde796bd67d1e073
Gerrit-PatchSet: 13
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to