leptris 1.9.41-aarch64-linux → 1.9.43-aarch64-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/ffi.rb +4 -0
- data/lib/leptris/xml/pull.rb +28 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3585b1f38f17d8a06b370034756a6eeccc78605843c1133f36bed7ff07d92f6f
|
|
4
|
+
data.tar.gz: 1170564a2c9bd8f49d6828491dae7bd9f803b477cab13bf665e2bc46708e4fa2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d1a742167a13771fe76e8c46f3b36b9eb7bc9c02e639f548888e19de588f57e00a727ad4fb645daab0dadba444ec22144e4829ff496a82707efb0c76e30e19e
|
|
7
|
+
data.tar.gz: ac245cc32da208680784662259db2a625b5f5a9d2ed252b1884fe5f20c31d8e861c6b68bb5d247c9ad7052ed28dd2b10f77bbae354f3007f4114d61d90eaa618
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,49 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.43] - 2026-08-31
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Pull prefix events surface (leptris-ruby#648's residual)**: the
|
|
13
|
+
engine's pull stream has always carried start/end prefix events
|
|
14
|
+
(codes 8/9; the default namespace's prefix is legitimately `""`)
|
|
15
|
+
— the binding's type map lacked the kinds, silently delivering
|
|
16
|
+
nil-typed Events that the 1.9.42 staging guard then misread as
|
|
17
|
+
corruption on healthy engines. `:start_prefix`/`:end_prefix` now
|
|
18
|
+
map correctly on both cursor and batch paths, and the guard's
|
|
19
|
+
name check only invalidates kinds that must carry names
|
|
20
|
+
(start/end element, PI target). Engine 1.9.21's staging fix
|
|
21
|
+
(upstream #648) verified clean through the batch path once the
|
|
22
|
+
kinds were mapped.
|
|
23
|
+
|
|
24
|
+
### Meta
|
|
25
|
+
|
|
26
|
+
- The 1.9.19–1.9.21 lockstep is HELD: engine 1.9.19+ carries a DOM
|
|
27
|
+
parse regression — a self-closing element followed by text inside
|
|
28
|
+
a depth-2 parent fails to parse (`<div><p><br/>hello</p></div>`)
|
|
29
|
+
— filed as leptris/leptris#653. `Node#visit` (the #645a
|
|
30
|
+
wrap-free walk), the sized ext-serialize entry (PR #107's
|
|
31
|
+
substance), and this pull fix's engine-1.9.21 verification are
|
|
32
|
+
parked on a branch awaiting the fix.
|
|
33
|
+
|
|
34
|
+
## [1.9.42] - 2026-08-30
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **Pull batch staging corruption: fail loudly, never deliver
|
|
39
|
+
garbage (leptris/leptris#646)**: `leptris_pull_next_batch`'s
|
|
40
|
+
staging arena misplaces record strings once staged content
|
|
41
|
+
crosses its block boundary (~185 bytes of attribute value under
|
|
42
|
+
nested attr-carrying ancestors — the #625 fix family did not
|
|
43
|
+
reach the batch staging). `Parser#each_batch` now validates each
|
|
44
|
+
staged record — unknown type codes, empty/control-byte/invalid-
|
|
45
|
+
encoding names cannot be legal XML events — and raises a
|
|
46
|
+
descriptive error pointing at `#each` (the cursor path reads the
|
|
47
|
+
same documents correctly; SAX default, recorder drain, and DOM
|
|
48
|
+
are unaffected). Bisection attached upstream: ok at 180 staged
|
|
49
|
+
bytes, corrupt at 190, in the minimized shape.
|
|
50
|
+
|
|
8
51
|
## [1.9.41] - 2026-08-30
|
|
9
52
|
|
|
10
53
|
### Changed
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/ffi.rb
CHANGED
|
@@ -766,6 +766,10 @@ module Leptris
|
|
|
766
766
|
PULL_PI = 5
|
|
767
767
|
PULL_END_DOCUMENT = 6
|
|
768
768
|
PULL_ERROR = 7
|
|
769
|
+
# Prefix events (types.h LeptrisPullEventType 8/9): the
|
|
770
|
+
# default namespace's prefix is legitimately "".
|
|
771
|
+
PULL_START_PREFIX = 8
|
|
772
|
+
PULL_END_PREFIX = 9
|
|
769
773
|
|
|
770
774
|
LEPTRIS_PARSE_DEFAULT = 0
|
|
771
775
|
LEPTRIS_PARSE_DROP_WS_TEXT = 1
|
data/lib/leptris/xml/pull.rb
CHANGED
|
@@ -28,6 +28,13 @@ module Leptris::XML::Pull
|
|
|
28
28
|
Leptris::XML::FFI::PULL_PI => :pi,
|
|
29
29
|
Leptris::XML::FFI::PULL_END_DOCUMENT => :end_document,
|
|
30
30
|
Leptris::XML::FFI::PULL_ERROR => :error,
|
|
31
|
+
# Prefix events ride the stream ("" prefix = the default
|
|
32
|
+
# namespace): the engine has always delivered them; the map
|
|
33
|
+
# lacked the kinds, silently yielding nil-typed Events — which
|
|
34
|
+
# the staging guard then misread as corruption after the real
|
|
35
|
+
# engine fix landed (leptris/leptris#648's residual).
|
|
36
|
+
Leptris::XML::FFI::PULL_START_PREFIX => :start_prefix,
|
|
37
|
+
Leptris::XML::FFI::PULL_END_PREFIX => :end_prefix,
|
|
31
38
|
}.freeze
|
|
32
39
|
|
|
33
40
|
class Parser
|
|
@@ -85,14 +92,30 @@ module Leptris::XML::Pull
|
|
|
85
92
|
name_ptr = buffer.get_pointer(base + name_off)
|
|
86
93
|
text_ptr = buffer.get_pointer(base + text_off)
|
|
87
94
|
type = TYPES[buffer.get_int(base + type_off)]
|
|
95
|
+
name = name_ptr.null? ? nil :
|
|
96
|
+
name_ptr.read_string.force_encoding(Encoding::UTF_8)
|
|
97
|
+
# Staging-corruption guard (leptris/leptris#648): the C
|
|
98
|
+
# batch's staging arena misplaces record strings once the
|
|
99
|
+
# staged content crosses its block boundary (~185 bytes of
|
|
100
|
+
# attribute value under nested attr-carrying ancestors) —
|
|
101
|
+
# names come back empty, control-byte-laced, or
|
|
102
|
+
# invalid-encoding, and unknown type codes surface as nil.
|
|
103
|
+
# Element names can never look like that: fail loudly
|
|
104
|
+
# instead of delivering garbage, and point at the cursor
|
|
105
|
+
# path, which reads the same documents correctly.
|
|
106
|
+
if type.nil? ||
|
|
107
|
+
(name && (!name.valid_encoding? ||
|
|
108
|
+
name.match?(/[\x00-\x08\x0e-\x1f]/))) ||
|
|
109
|
+
(%i[start_element end_element pi].include?(type) &&
|
|
110
|
+
(name.nil? || name.empty?))
|
|
111
|
+
raise Leptris::XML::Error,
|
|
112
|
+
"pull batch staging corruption (leptris/leptris#648) — " \
|
|
113
|
+
"use Parser#each (cursor) for this document"
|
|
114
|
+
end
|
|
88
115
|
text = text_ptr.null? ? nil :
|
|
89
116
|
text_ptr.read_string.force_encoding(Encoding::UTF_8)
|
|
90
117
|
text = Leptris::XML::FFI.read_pi_data(text) if type == :pi
|
|
91
|
-
Event.new(type,
|
|
92
|
-
name_ptr.null? ? nil :
|
|
93
|
-
name_ptr.read_string.force_encoding(Encoding::UTF_8),
|
|
94
|
-
text, nil
|
|
95
|
-
)
|
|
118
|
+
Event.new(type, name, text, nil)
|
|
96
119
|
end
|
|
97
120
|
# The attr mirror holds the batch's most recent start.
|
|
98
121
|
last_start = nil
|