morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::session::detail::EscapingWriteOpts Struct Reference

Write options that escape ASCII control bytes as \\uXXXX sequences. More...

#include <session_auth.hpp>

Public Attributes

bool escape_control_characters = true
 Emit control bytes as \\uXXXX rather than raw.

Detailed Description

Write options that escape ASCII control bytes as \\uXXXX sequences.

glaze 7.4 leaves control bytes (0x00-0x1F) unescaped by default, which breaks a SessionToken carrying one in principal/roles two ways: RFC 8259 requires those bytes escaped, so the raw byte alone yields JSON this morph's own TokenVerifier cannot decode — a signed token that fails to verify, a silent issue-succeeds/verify-fails asymmetry; worse, once the same string also contains an escaped \\endiskip or ", glaze's chunked writer path silently rewrites the control byte as two 0x00 bytes, corrupting the claims before they are ever signed. Mirrors morph::wire::detail::EscapingWriteOpts (core/wire.hpp) exactly; duplicated here (rather than shared) so this header stays free of a core/ dependency. Escaping is lossless, so any such byte still round-trips through TokenVerifier::verify unchanged.

Definition at line 368 of file session_auth.hpp.

Member Data Documentation

◆ escape_control_characters

bool morph::session::detail::EscapingWriteOpts::escape_control_characters = true

Emit control bytes as \\uXXXX rather than raw.

Definition at line 371 of file session_auth.hpp.


The documentation for this struct was generated from the following file: