Skip to content

fix(pdu): scope Font Map leniency - #1506

Merged
Benoît Cortier (CBenoit) merged 1 commit into
masterfrom
copilot/scope-font-map-leniency
Jul 31, 2026
Merged

fix(pdu): scope Font Map leniency#1506
Benoît Cortier (CBenoit) merged 1 commit into
masterfrom
copilot/scope-font-map-leniency

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Summary

Supersedes #1472. The prior approach made FontPdu::decode accept empty input, but FontPdu is shared by Font List and Font Map. A malformed header-only client Font List could therefore decode successfully and advance acceptor finalization.

This PR keeps FontPdu::decode strict and defaults only a fully empty Server Font Map body in the ShareDataPduType::FontMap dispatch arm. Header-only Font Map decoding succeeds with FontPdu defaults; header-only Font List remains rejected.

Tests

  • cargo test -p ironrdp-testsuite-core --test integration_tests_core pdu::rdp
  • cargo clippy -p ironrdp-pdu --all-targets -- -D warnings

Only default a fully empty Server Font Map body at ShareDataPdu dispatch. Keep the shared FontPdu decoder strict so a header-only client Font List is rejected.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 31, 2026 17:40
@github-actions github-actions Bot added A-core Area: Core tier A-internal Area: Internal tier rust Pull requests that update Rust code size/XS Size: Under 30 lines of code labels Jul 31, 2026

Copilot AI 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.

Pull request overview

Scopes empty-body tolerance to Server Font Map decoding while preserving strict Font List validation.

Changes:

  • Defaults empty Font Map bodies to FontPdu::default().
  • Adds regression coverage for accepted Font Maps and rejected Font Lists.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/ironrdp-pdu/src/rdp/headers.rs Adds scoped Font Map leniency.
crates/ironrdp-testsuite-core/tests/pdu/rdp.rs Adds header-only decoding tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CBenoit Benoît Cortier (CBenoit) changed the title fix(pdu): scope Font Map leniency (supersedes #1472) fix(pdu): scope Font Map leniency Jul 31, 2026
@CBenoit
Benoît Cortier (CBenoit) merged commit e496b7b into master Jul 31, 2026
24 of 25 checks passed
@CBenoit
Benoît Cortier (CBenoit) deleted the copilot/scope-font-map-leniency branch July 31, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-core Area: Core tier A-internal Area: Internal tier rust Pull requests that update Rust code size/XS Size: Under 30 lines of code

Development

Successfully merging this pull request may close these issues.

3 participants