[ https://issues.apache.org/jira/browse/SLING-12241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeny Tugarev updated SLING-12241: ----------------------------------- Description: When _null_ is passed as a user name to sling testing client, to mimic the anonymous user, an NPE is thrown in FormBasedAuthInterceptor. to reproduce: {code:java} FormBasedAuthInterceptor interceptor = new FormBasedAuthInterceptor(LOGIN_COOKIE_NAME); SlingClient client = SlingClient.Builder.create(httpServer.getURI(), null, "pass") .addInterceptorLast(interceptor).build(); client.doGet(LOGIN_OK_PATH, 200); // NPE {code} was: When null is passed as a user name to sling testing client, to mimic the anonymous user, an NPE is thrown in FormBasedAuthInterceptor. to reproduce: {code:java} FormBasedAuthInterceptor interceptor = new FormBasedAuthInterceptor(LOGIN_COOKIE_NAME); SlingClient client = SlingClient.Builder.create(httpServer.getURI(), null, "pass") .addInterceptorLast(interceptor).build(); client.doGet(LOGIN_OK_PATH, 200); // NPE {code} > Anonymous testing client throws NPE > ----------------------------------- > > Key: SLING-12241 > URL: https://issues.apache.org/jira/browse/SLING-12241 > Project: Sling > Issue Type: Bug > Components: Apache Sling Testing Clients > Affects Versions: Apache Sling Testing Clients 3.0.22 > Reporter: Evgeny Tugarev > Assignee: Andrei Dulvac > Priority: Major > > When _null_ is passed as a user name to sling testing client, to mimic the > anonymous user, an NPE is thrown in FormBasedAuthInterceptor. > to reproduce: > {code:java} > FormBasedAuthInterceptor interceptor = new > FormBasedAuthInterceptor(LOGIN_COOKIE_NAME); > SlingClient client = SlingClient.Builder.create(httpServer.getURI(), null, > "pass") > .addInterceptorLast(interceptor).build(); > client.doGet(LOGIN_OK_PATH, 200); // NPE > {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)