eclipse-ee4j / eclipse-ee4j/soteria

java.lang.ArrayIndexOutOfBoundsException: 1

Open
#262 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
72
Forks
34
PR merge metrics
No merged PRs in 30d

Description

https://github.com/eclipse-ee4j/soteria/blob/665fe609add277fb76acd810e29b91146327045c/impl/src/main/java/org/glassfish/soteria/mechanisms/BasicAuthenticationMechanism.java#L60

This cause: 'java.lang.ArrayIndexOutOfBoundsException: 1' with this: Authorization: Basic dGVzdDo=

*Note: 'test:' with base64 -> dGVzdDo=

When: if some one press user name without password and use BASIC auth.

Why:
System.out.println(Arrays.toString("World:".split(":"))); //Result: [World]

Contributor guide

Open the contributing guide

Research direction

Start at impl/src/main/java/org/glassfish/soteria/mechanisms/BasicAuthenticationMechanism.java line 60 and reproduce the failure with the Authorization: Basic dGVzdDo= header. Confirm that a username without a password no longer causes an ArrayIndexOutOfBoundsException, then verify the relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.