Skip to content

Commit

Permalink
Merge pull request #54 from eclipxe13/fix-encoding-rfcreceptor
Browse files Browse the repository at this point in the history
Corrección de codificación de `RfcReceptor` (v0.4.7)
  • Loading branch information
eclipxe13 authored Aug 10, 2022
2 parents 8e0c4a8 + c6fad24 commit 6230e98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ que nombraremos así: ` Breaking . Feature . Fix `, donde:
**Importante:** Las reglas de SEMVER no aplican si estás usando una rama (por ejemplo `main-dev`)
o estás usando una versión cero (por ejemplo `0.18.4`).

## Unreleased 2022-07-25
## Versión 0.4.7 2022-08-10

No se estaba haciendo la codificación correcta de `RfcReceptor`, que provocaba un fallo cuando se solicitaba
una consulta donde el RFC recibido tuviera un ampersand `&`.

### Cambios previos 2022-07-25

La clase `MicroCatalog` requiere la definición de datos extendidos, no estaban definidos y entonces
el proceso de integración continua falló. Se agregaron para hacer esta corrección.
Expand Down
5 changes: 4 additions & 1 deletion src/RequestBuilder/FielRequestBuilder/FielRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ function (string $name, string $value): string {
));
$xmlRfcReceived = '';
if ('' !== $rfcReceiver) {
$xmlRfcReceived = "<des:RfcReceptores><des:RfcReceptor>${rfcReceiver}</des:RfcReceptor></des:RfcReceptores>";
$xmlRfcReceived = sprintf(
'<des:RfcReceptores><des:RfcReceptor>%s</des:RfcReceptor></des:RfcReceptores>',
htmlspecialchars($rfcReceiver, ENT_XML1)
);
}

$toDigestXml = <<<EOT
Expand Down

0 comments on commit 6230e98

Please sign in to comment.