Skip to content

Releases: lestrrat-go/helium

v0.2.0

19 Jun 04:11
fd1e7b3

Choose a tag to compare

What's Changed

  • xpath3: fix format-integer picture validation and string arg atomization by @lestrrat in #487
  • reject duplicate signedinfo in xmldsig1 verify by @lestrrat in #488
  • confine nested external entities to configured fs by @lestrrat in #493
  • fix key() panic on empty first argument by @lestrrat in #494
  • confine FileURIResolver with os.Root by @lestrrat in #495
  • bound sequence accumulation in xpath3 compositions by @lestrrat in #496
  • fix schematron swallowing xpath eval errors by @lestrrat in #497
  • xsd: require all xs:key fields to be present by @lestrrat in #498
  • xmlenc1: bind aes key size to declared algorithm by @lestrrat in #491
  • reject mismatched rsa-oaep digest and mgf by @lestrrat in #489
  • validate element and attribute names on serialize by @lestrrat in #492
  • xslt3: route schema-location loads through resolver by @lestrrat in #499
  • fix xmlenc1 encrypt element in place by @lestrrat in #490
  • extract EncryptedData test literal to const by @lestrrat in #505
  • reject duplicate dtd enumeration tokens by @lestrrat in #500
  • fix html parser spin on nul byte by @lestrrat in #501
  • reject duplicate attributes in start tags by @lestrrat in #502
  • fix catalog nil deref when no loader by @lestrrat in #503
  • strip xml whitespace in xmlenc base64 fields by @lestrrat in #504
  • strip xml whitespace from xmldsig1 base64 by @lestrrat in #506
  • enforce recursion limit in EvaluateReuse by @lestrrat in #507
  • fix self-loop when replacing node with its sibling by @lestrrat in #508
  • validate time ranges in xs:time and xs:dateTime by @lestrrat in #509
  • return ErrNilNode from WriteTo on nil node by @lestrrat in #510
  • validate relaxng base64Binary lexical space by @lestrrat in #512
  • restore var scope after xsl:try body by @lestrrat in #513
  • reject non-singleton fn:index-of search value by @lestrrat in #515
  • unlink children moved to primary result-document by @lestrrat in #516
  • fix xs:dateTimeStamp comparisons by @lestrrat in #518
  • fix runecursor read short-buffer panic by @lestrrat in #519
  • fix double-counted fractional seconds in duration div by @lestrrat in #520
  • preserve absolute uri base in c14n 1.1 fixup by @lestrrat in #521
  • guard nil context node in absolute paths by @lestrrat in #523
  • fail lint when xinclude processing errors by @lestrrat in #527
  • include namespace nodes in signed subtree c14n by @lestrrat in #528
  • reject trailing tokens in ParseSequenceType by @lestrrat in #533
  • bound float frac rounding to avoid nan overflow by @lestrrat in #524
  • fix format-integer CJK panic for large values by @lestrrat in #511
  • process apply-templates selection in order by @lestrrat in #522
  • surface bytecursor error returned with data by @lestrrat in #530
  • reject malformed utf-16 in unparsed-text by @lestrrat in #531
  • reject non-blank cdata in empty xsd content by @lestrrat in #517
  • clear node context for atomic xsl:iterate items by @lestrrat in #525
  • match xsd root element on full expanded name by @lestrrat in #529
  • report invalid schematron value-of select by @lestrrat in #532
  • fix cdata detection in xml normalization by @lestrrat in #534
  • reject idc field selecting multiple nodes by @lestrrat in #535
  • validate element and attribute names in stream writer by @lestrrat in #537
  • apply arg coercion in named function references by @lestrrat in #536
  • register used-package #all templates under modeAll by @lestrrat in #541
  • fix xinclude double-resolve of relative base by @lestrrat in #526
  • reject non-date/time args in fn:dateTime by @lestrrat in #540
  • reject xs:import with mismatched namespace by @lestrrat in #543
  • validate inline attribute simpleType by @lestrrat in #539
  • validate shim encoder token names by @lestrrat in #538
  • keep xsl:sequence order in document variables by @lestrrat in #544
  • treat absolute-uri include/import hrefs as absolute by @lestrrat in #542
  • order typed template results in document variables by @lestrrat in #545
  • reject xmldsig signatures with no references by @lestrrat in #546
  • route NewEvalState through newEvalCtx by @lestrrat in #548
  • resolve inline attr type in idc key keys by @lestrrat in #555
  • retain empty default and fixed constraints by @lestrrat in #551
  • validate xsi:nil as xs:boolean lexical by @lestrrat in #557
  • error on unsupported xinclude text encoding by @lestrrat in #547
  • wire helium lint --encode through to output by @lestrrat in #552
  • reject unsafe html element and attr names by @lestrrat in #549
  • route relaxng xsd datatypes through value validator by @lestrrat in #550
  • raise XTDE0860 in attribute capture branches by @lestrrat in #556
  • use uri-aware resolution for xslt resources by @lestrrat in #558
  • fix eval-reuse focus loss and frozen clock by @lestrrat in #560
  • require xmldsig namespace for references by @lestrrat in #559
  • fix xsd default/fixed presence and namespace by @lestrrat in #563
  • fix xsi:nil for no-type elems and nillable lexical by @lestrrat in #561
  • report unresolved xsd type references by @lestrrat in #554
  • compare xsd fixed values in value space by @lestrrat in #553
  • canonicalize idc fields in value space by @lestrrat in #562
  • annotate skip and anytype idc elements by @lestrrat in #564
  • fix xsd all particle qname matching by @lestrrat in #566
  • guard docorder cache with a mutex by @lestrrat in #570
  • treat undeclared general entity as fatal by @lestrrat in #572
  • accept year zero in xsd date casts by @lestrrat in #573
  • fix xslt3 output def mutation and item serialization by @lestrrat in #577
  • guard nil schema and document in xsd validate by @lestrrat in #574
  • detect duplicate named xsd components by @lestrrat in #571
  • cap external dtd reads with byte limit by @lestrrat in #565
  • reject multi-item qname and map:merge options args by @lestrrat in #576
  • guard addchild against dom cycles by @lestrrat in #567
  • fix xpath3 list and dateTimeStamp constructors by @lestrrat in #575
  • bound external entity reads and check entity refs by @lestrrat in #569
  • fix xsd list/union/qname facet validation by @lestrrat in #579
  • fix xsd date and value-space validation by @lestrrat in #580
  • canonicalize string-derived and duration map keys by @lestrrat in https:/...
Read more

v0.1.0

17 Jun 00:17
83a8477

Choose a tag to compare

This is the first v0.1.x release. It is dominated by security and spec-correctness hardening, which tightens behavior for some inputs — hence the minor-version bump. The headline backwards-incompatible changes are called out below; the stricter-validation and error-propagation fixes that make up the rest of the hardening are in the full list further down.

⚠️ Breaking changes

Public API

  • xsd: FacetSet.Pattern *stringFacetSet.Patterns []string (#455)

Security — file/URI access is now default-deny (requires a resolver / opt-in)

  • xslt3: filesystem default-deny for stylesheet loads — xsl:import/xsl:include, output-format docs, and fn:transform(stylesheet-location=…) no longer read the local filesystem implicitly (#472)
  • xslt3: xsl:source-document, xsl:merge, and fn:stream-available are routed through the resolver — no implicit disk reads (#467)
  • xinclude: the XPointer inner parser is sandboxed (custom resolvers get a deny-all FS) to block XXE (#469)
  • relaxng: BaseDir containment is enforced on all resolved hrefs; absolute and xml:base escapes are blocked (#464)
  • xmldsig1: unsupported Reference transforms are rejected (fail-closed) instead of verifying against untransformed bytes (#463)

Changed evaluation results / output

  • xpath1/xpath3: unprefixed name tests match only no-namespace nodes — previously matched any namespace (#466)
  • xpath1: node-set vs boolean is compared as a set per XPath 1.0 REC §3.4 (#473)
  • xpath1: external node-set variables are now returned in document order (#476)
  • c14n: an explicitly empty node set now produces empty output — previously the full document (#461)
  • schematron: attribute context nodes (e.g. context="@id") now execute their rules — previously dropped (#465)

The remainder of the release adds stricter input validation (parser/stream/xsd/xpath3) and surfaces previously-swallowed io.Writer errors. These can also reject inputs that earlier versions silently accepted; see the full list below.


What's Changed

  • xpath3: allow partial application on maps and arrays by @lestrrat in #454
  • xsd: OR multiple same-step pattern facets by @lestrrat in #455
  • xsd: enforce XSD-only regex constructs in pattern facets by @lestrrat in #456
  • xsd: fix char-class subtraction in pattern facets by @lestrrat in #457
  • html: avoid rcdata hang on invalid end tag by @lestrrat in #458
  • parser: guard malformed character references by @lestrrat in #459
  • xslt3: init result-doc maps in fn:transform by @lestrrat in #460
  • c14n: emit empty output for empty node set by @lestrrat in #461
  • xpath3: range-check codepoints-to-string input by @lestrrat in #462
  • xmldsig1: reject unsupported reference transforms by @lestrrat in #463
  • relaxng: enforce basedir on all resolved hrefs by @lestrrat in #464
  • schematron: validate attribute context nodes by @lestrrat in #465
  • xpath: match unprefixed names in no namespace by @lestrrat in #466
  • xslt3: route runtime uris through resolver by @lestrrat in #467
  • writer: propagate io.Writer errors by @lestrrat in #468
  • xinclude: sandbox inner parser to block xpointer XXE by @lestrrat in #469
  • html: propagate serializer write errors by @lestrrat in #470
  • xpath3: retry spurious regexp2 match timeouts by @lestrrat in #471
  • xslt3: default-deny filesystem for stylesheet loads by @lestrrat in #472
  • xpath1: compare node-set to boolean as a set by @lestrrat in #473
  • parser: reject non-XML chars in text content by @lestrrat in #474
  • xpath: reject fragment in base uri for empty arg by @lestrrat in #475
  • xpath1: document-order external node-set vars by @lestrrat in #476
  • xpath3: require xs:integer array positions by @lestrrat in #477
  • xpath3: validate integer/cardinality in sequence fns by @lestrrat in #478
  • xpath3: validate and bound to-operator operands by @lestrrat in #479
  • xpath3: exact normalization of large integer map keys by @lestrrat in #480
  • xmldsig1: reject out-of-range rsa exponent by @lestrrat in #484
  • parser: validate cdata and width-aware slow paths by @lestrrat in #481
  • stream: validate comment and pi well-formedness by @lestrrat in #485
  • xpath3: validate args in math/map/json builtins by @lestrrat in #482
  • xpath3: enforce builtin parameter signatures by @lestrrat in #483
  • readme: list xmldsig1 and xmlenc1 packages by @lestrrat in #486

Full Changelog: v0.0.2...v0.1.0

v0.0.2

15 Jun 07:01
d96fe60

Choose a tag to compare

What's Changed

  • add xmldsig1 and xmlenc1 packages by @lestrrat in #400
  • Bump actions/upload-artifact from 4.6.2 to 7.0.0 by @dependabot[bot] in #401
  • Bump actions/setup-go from 6.3.0 to 6.4.0 by @dependabot[bot] in #402
  • Bump golang.org/x/text from 0.35.0 to 0.36.0 by @dependabot[bot] in #403
  • Bump actions/cache from 5.0.4 to 5.0.5 by @dependabot[bot] in #405
  • Bump actions/upload-artifact from 7.0.0 to 7.0.1 by @dependabot[bot] in #406
  • Bump goreleaser/goreleaser-action from 7.0.0 to 7.1.0 by @dependabot[bot] in #408
  • Bump golang.org/x/net from 0.52.0 to 0.53.0 by @dependabot[bot] in #404
  • Bump github.com/dlclark/regexp2 from 1.11.5 to 1.12.0 by @dependabot[bot] in #407
  • Bump goreleaser/goreleaser-action from 7.1.0 to 7.2.1 by @dependabot[bot] in #409
  • pin golangci-lint and fix lint by @lestrrat in #411
  • Bump golang.org/x/text from 0.36.0 to 0.37.0 by @dependabot[bot] in #410
  • Bump golang.org/x/net from 0.53.0 to 0.54.0 by @dependabot[bot] in #412
  • route external resource loads through fs.FS by @lestrrat in #413
  • xmlenc1: fix CBC padding oracle, XXE on decrypted plaintext, GCM AAD (H2) by @lestrrat in #416
  • fix(h1): default-deny network and filesystem access in fn:doc and fn:unparsed-text by @lestrrat in #417
  • xmldsig1: harden against XML Signature Wrapping (XSW) attacks by @lestrrat in #415
  • export xsd.ValidationError; switch relaxng include guard to map by @lestrrat in #419
  • xinclude: filepath.Clean resolved hrefs before fs.Open by @lestrrat in #420
  • xpath3: bound regexp2 fallback with DefaultRegexMatchTimeout by @lestrrat in #421
  • xpointer: add Compile for reusable pre-compiled expression by @lestrrat in #423
  • xsd: cap xs:import recursion depth by @lestrrat in #422
  • xpath3: expose DefaultMaxRecursionDepth as tunable var by @lestrrat in #424
  • html: route silenced SAX callback errors via OnWarning; add Strict by @lestrrat in #426
  • xinclude: address PR #420 review follow-ups by @lestrrat in #425
  • xslt3: default-deny network/filesystem for fn:doc / document() by @lestrrat in #427
  • html: surface short writes in latin1EncodingWriter by @lestrrat in #428
  • parser: absolute entity-expansion ceiling survives RelaxLimits by @lestrrat in #429
  • xpath3: raise DefaultRegexMatchTimeout to 5s by @lestrrat in #431
  • schemas: reject schema location/href escaping baseDir by @lestrrat in #430
  • Bump goreleaser/goreleaser-action from 7.2.1 to 7.2.2 by @dependabot[bot] in #432
  • Bump actions/stale from 10.2.0 to 10.3.0 by @dependabot[bot] in #433
  • Bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by @dependabot[bot] in #434
  • Bump golang.org/x/net from 0.54.0 to 0.55.0 by @dependabot[bot] in #435
  • Bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #436
  • xsd: deterministic extension-merge order by @lestrrat in #438
  • Bump golang.org/x/text from 0.37.0 to 0.38.0 by @dependabot[bot] in #439
  • xsd: consume non-first choice branch after an omitted optional element by @lestrrat in #443
  • Bump golang.org/x/net from 0.55.0 to 0.56.0 by @dependabot[bot] in #440
  • xsd: fractionDigits counts significant fraction digits, not lexical by @vfilter in #445
  • xsd: honor group min/maxoccurs in lookahead by @lestrrat in #446
  • relaxng: prefer consuming branch in naive choice by @lestrrat in #447
  • relaxng: backtrack greedy members in naive group by @lestrrat in #449
  • xsd: compare enumeration in value space by @lestrrat in #448
  • xsd: 14h rule for mixed-tz datetime compare by @lestrrat in #450
  • relaxng: backtrack token group and choice matching by @lestrrat in #451
  • xsd: compare identity-constraint keys by value by @lestrrat in #452
  • pin goreleaser version to v2.16.0 by @lestrrat in #453

New Contributors

Full Changelog: v0.0.1...v0.0.2

v0.0.1

29 Mar 07:13

Choose a tag to compare

Description

This is the initial release. Things should be somewhat stable, but still do be careful.

What's Changed

Read more