Skip to content

Throw exception on invalid XML text content#709

Open
lauris71 wants to merge 5 commits into
open-eid:masterfrom
lauris71:xml1_0
Open

Throw exception on invalid XML text content#709
lauris71 wants to merge 5 commits into
open-eid:masterfrom
lauris71:xml1_0

Conversation

@lauris71

Copy link
Copy Markdown

Throw exception while creating XML container with text elements (location, role) that are not valid utf8 strings or contain invalid characters for XML 1.0.

Signed-off-by: Lauris Kaplinski lauris@raulwalter.com

Lauris Kaplinski and others added 5 commits July 16, 2026 11:16
Signed-off-by: Lauris Kaplinski <lauris@raulwalter.com>
Signed-off-by: Lauris Kaplinski <lauris@raulwalter.com>
Signed-off-by: Lauris Kaplinski <lauris@raulwalter.com>
Signed-off-by: Raul Metsma <raul@metsma.ee>
IB-8670

Signed-off-by: Raul Metsma <raul@metsma.ee>
Comment thread src/crypto/Signer.cpp
using namespace digidoc;
using namespace std;

static void requireXMLText(string_view value, string_view field)
"\xF4\x8F\xBF\xBF"; // U+10FFFF
BOOST_CHECK(!util::validateXMLText(legal));

const string invalid[] = {
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