XML::LibXML string parsing mishandles declared encodings
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Start with src/main/java/org/perlonjava/runtime/perlmodule/XMLLibXML.java, especially xmlInputSource(), and trace how string inputs reach the XML parser. Use the reported failures in t/02gateway.t and the fixtures with ISO-8859-1 declarations as evidence; verify declared-encoding strings, decoded character strings, and BOM-marked byte strings against system Perl behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
PerlOnJava's bundled XML::LibXML returns incorrect character data when parsing the PagSeguro XML fixtures used by Business::CPI::Gateway::PagSeguro 0.904. The upstream distribution passes all 17 tests under system Perl, but fails 3 assertions under PerlOnJava in t/02gateway.t.
Reproduction evidence
CPAN random tester run 20261106-154847-45334:
t/02gateway.tfailures:notification for completed transaction,notification for failed transaction, andit parses the file correctly.- Notification payer name: PerlOnJava returns
Jo\uFFFDo da Silva; expected UTF-8 bytes forJoão da Silva. - Transaction payer name: PerlOnJava returns
José Comprador; expectedJosé Comprador, matching the system Perl result for the fixture's declared encoding. - System Perl oracle: all 17 tests pass, including
t/02gateway.t.
The fixtures declare encoding="ISO-8859-1" while containing UTF-8 byte sequences for the accented names. The parser implementation in src/main/java/org/perlonjava/runtime/perlmodule/XMLLibXML.java sends most string inputs to a StringReader in xmlInputSource(). That character-based path bypasses XML byte decoding according to the declaration. The transaction mismatch directly reflects this; the replacement character in notification parsing also points to byte/character conversion on that path and should be covered while fixing it.
Expected behavior
Match system XML::LibXML behavior for string input carrying an XML encoding declaration, including these upstream cases. Preserve correct behavior for already-decoded character strings and BOM-marked byte strings.
Context
The target distribution is pure Perl and uses XML::LibXML; the failing implementation is PerlOnJava's bundled Java provider. No distribution source or tests were modified during classification.
- Lenguaje dominante
- Perl
- Estrellas
- 65
- Forks
- 8
- Merge medio
- 5 h 57 min
- PR fusionados (30 d)
- 177
Preparar el entorno
- Incluye un Dockerfile o un 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 fglock/PerlOnJava
-
area:runtime documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
Honor scalar context for sort returned from a subroutinePosiblemente ocupada @fglock la tomó hoy. Abiertoarea:runtime bug
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
fglock/PerlOnJava#1991 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:parser bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
fglock/PerlOnJava#1990 ·
Los mantenedores suelen responder en 1 día
-
area:backend bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
fglock/PerlOnJava#1981 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:runtime bug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
fglock/PerlOnJava#1980 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
check_keywords.pl dies before reporting an unknown keyword categoryPosiblemente ocupada @zhaohai666 la tomó hace 1 día. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
libwww-perl/HTTP-Message#236 ·
-
1.severity: security
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
wave-followup
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100