Inconsistent handling of tags starting with digits (Parser accepts invalid XML)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 53/100
Línea de trabajo
Start by reading the parser’s name handling and its existing XML well-formedness tests; the issue does not identify specific files or tests. Check how element names beginning with digits are accepted, then add coverage for the shown <1stElement> case and confirm parsing rejects it with an error. The expected behavior is strict validation of XML name rules.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There is a critical inconsistency in how quick-xml handles tags that begin with digits. Because XML element naming rules (NCName constraints), these elements are problematic.
Currently:
The Parser is too permissive: It accepts XML that violates XML well-formedness rules (tags starting with digits).
This leads to a complete breakdown of interoperability and data integrity when round-tripping data through quick-xml.
Permissive Parsing
The parser accepts invalid XML where element tags values imply names starting with a digit. Standard-compliant parsers should handle these carefully, but quick-xml current behavior accepts them as valid XML data despite the underlying XML structure being potentially malformed or ambiguous.
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This tag name starts with '1', which is illegal.
Any conformant XML parser will reject this document. -->
<1stElement>Data</1stElement>
</root>
Expected Behavior
Parser should strictly validate XML well-formedness. If a tag name violates XML naming rules, it should ideally raise an error or handle the namespace logic strictly according to the XML spec.
- Lenguaje dominante
- Rust
- Estrellas
- 1.6k
- Forks
- 299
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tafia/quick-xml
-
Parser accepts an empty element or attribute namePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
DecodingReader::set_encoding panics when the XML declaration is longer than 64 bytesPosiblemente ocupada @emschwartz la tomó hace 4 días. Abiertobug encoding
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
tafia/quick-xml#1040 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
encoding optimization
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
tafia/quick-xml#1039 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
optimization question
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de tafia/quick-xml
Issues similares
-
ライブラリを追加Abiertopriority middle
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
KATO-Hiro/AtCoderClans#13015 ·
Los mantenedores suelen responder en 1 día
-
needs-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
UCS-Care-Group/mailcraft#1429 ·
Los mantenedores suelen responder en 1 día
-
priority: medium ready
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
TusanHomichi/PSIV#646 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
area:tui bug P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
agent-of-empires/agent-of-empires#5705 · 1 comentario ·
Los mantenedores suelen responder en 1 día