• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icerpc / icerpc-csharp / 32400820224
86%

Build:
DEFAULT BRANCH: main
Ran 20 Aug 2026 06:04PM UTC
Jobs 1
Files 257
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2026 06:00PM UTC coverage: 88.096% (+0.1%) from 87.998%
32400820224

push

github

web-flow
Reject invalid string type IDs when decoding Ice class slices (#4837)

The Ice decoder stored a peer-supplied string type ID verbatim, without
validation. This matters for preserved slices: `SliceInfo.TypeId` holds
either a type ID or a compact ID without recording which one, and
re-encoding a preserved slice parses `TypeId` as a compact ID unless it
starts with `::`. A peer could therefore send a string type ID such as
`"9999999999"` or `"-5"`; re-encoding the preserved slices then escaped
as `OverflowException` (from `int.Parse`) or `ArgumentException` (from
`EncodeSize`) instead of `InvalidDataException` — surfacing as
`StatusCode.InternalError` for what is actually bad peer data.

This PR validates at the trust boundary: `DecodeTypeId` now throws
`InvalidDataException` when a string type ID does not start with `::`. A
valid Ice type ID always starts with `::`, and slices with compact IDs
use their own type-ID kind on the wire — so after this check, a
preserved slice's `TypeId` can always be re-encoded.

On the encoder side, the `catch (FormatException)` around the compact-ID
parse is now unreachable — `SliceInfo` is only created by the decoder —
so it's removed rather than left to mislabel a hypothetical internal bug
as invalid peer data.

Adds a regression test.

## What's Changed entry

None — only changes how invalid data received from a peer is reported.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

4 of 4 new or added lines in 2 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

12366 of 14037 relevant lines covered (88.1%)

3034.05 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
91.94
-0.36% src/IceRpc/Server.cs
Jobs
ID Job ID Ran Files Coverage
1 32400820224.1 20 Aug 2026 06:04PM UTC 3841
15.6
GitHub Action Run
Source Files on build 32400820224
  • Tree
  • List 257
  • Changed 206
  • Source Changed 3
  • Coverage Changed 206
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32400820224
  • 2965a294 on github
  • Prev Build on main (#32400261499)
  • Next Build on main (#32421583217)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc