Skip to content

fix: throw InvalidSep45ChallengeException for malformed SEP-45 challe… - #848

Merged
overcat merged 1 commit into
masterfrom
fix/sep45-malformed-input
Nov 20, 2026
Merged

overcat merged 1 commit into
masterfrom
fix/sep45-malformed-input

Conversation

@overcat

@overcat overcat commented Nov 20, 2026

Copy link
Copy Markdown
Member

…nges.

Fixes #834

…nges.

readChallengeAuthorizationEntries, and so
verifyChallengeAuthorizationEntries, let IllegalArgumentException and
NullPointerException escape for input a client can send: an unknown XDR
enum value or a string that isn't base64 (#834), an SCV_MAP argument
whose map is absent, and an argument value that should be a string but
isn't. They now throw the documented InvalidSep45ChallengeException, so
a server can answer them with 400 instead of 500.
@overcat
overcat enabled auto-merge (squash) November 20, 2026 10:02
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.66%. Comparing base (c4b71b7) to head (aa01aa6).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #848      +/-   ##
============================================
- Coverage     83.68%   83.66%   -0.03%     
- Complexity     1740     1743       +3     
============================================
  Files           234      234              
  Lines          6241     6244       +3     
  Branches        713      713              
============================================
+ Hits           5223     5224       +1     
- Misses          627      629       +2     
  Partials        391      391              
Files with missing lines Coverage Δ
src/main/java/org/stellar/sdk/Sep45Challenge.java 78.30% <100.00%> (+0.24%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat
overcat merged commit 2c58eb6 into master Nov 20, 2026
11 checks passed
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.

Sep45Challenge.readChallengeAuthorizationEntries throws IllegalArgumentException instead of InvalidSep45ChallengeException for some malformed input

1 participant