Skip to content

OAK-12259: oak-http: OakServlet mis-parses HTTP Basic credentials - m…#2983

Merged
reschke merged 8 commits into
trunkfrom
OAK-12259
Jul 1, 2026
Merged

OAK-12259: oak-http: OakServlet mis-parses HTTP Basic credentials - m…#2983
reschke merged 8 commits into
trunkfrom
OAK-12259

Conversation

@reschke

@reschke reschke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

…any many many tests.

EDIT: hint: this is a demo project. The PR fixes a ton of issues. The fixes have test coverage. There's a point where nitpicking on the test cases becomes a waste of time. Please only report major problems.

@reschke reschke self-assigned this Jun 26, 2026
@reschke reschke marked this pull request as draft June 26, 2026 17:42
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Commit-Check ❌

Commit rejected by Commit-Check.                                  
                                                                  
  (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)  
   / ._. \      / ._. \      / ._. \      / ._. \      / ._. \   
 __\( C )/__  __\( H )/__  __\( E )/__  __\( C )/__  __\( K )/__ 
(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)
   || E ||      || R ||      || R ||      || O ||      || R ||   
 _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._ 
(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)
 `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´ 
                                                                  
Commit rejected.                                                  
                                                                  
Type message check failed ==> Update oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java

Co-authored-by: Rishabh Kumar <rishabhdaim1991@gmail.com> 
The commit message should follow Conventional Commits. See https://www.conventionalcommits.org
Suggest: Commit message does not match the required pattern

@reschke reschke requested review from mbaedke and rishabhdaim June 26, 2026 18:16
@reschke reschke marked this pull request as ready for review June 26, 2026 20:49
Comment thread oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java Outdated
@reschke reschke requested a review from mbaedke June 29, 2026 16:09

@rishabhdaim rishabhdaim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review:

The production logic is correct — indexOf(':') properly handles colons in passwords, case-insensitive scheme match is right, and the AIOOBE→LoginException shift is the intended fix. Three test issues before merge.

nit: AuthorizationField.java:33 — new public method, AGENTS.md requires @NotNull/@Nullable annotations:

public static @NotNull SimpleCredentials valueOf(@NotNull Enumeration<String> values) throws LoginException

Comment thread oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java Outdated
Comment thread oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java Outdated
Comment thread oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java Outdated
@reschke reschke requested a review from rishabhdaim June 30, 2026 10:41
Comment on lines 54 to 55

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

un-reachable code.

Comment thread oak-http/src/test/java/org/apache/jackrabbit/oak/http/AuthorizationFieldTest.java Outdated
reschke and others added 2 commits June 30, 2026 18:45
…ationFieldTest.java

Co-authored-by: Rishabh Kumar <rishabhdaim1991@gmail.com>
@reschke reschke requested a review from rishabhdaim June 30, 2026 16:51
@sonarqubecloud

Copy link
Copy Markdown

@reschke reschke merged commit 386223e into trunk Jul 1, 2026
4 of 5 checks passed
@reschke reschke deleted the OAK-12259 branch July 1, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants