Skip to content

Fix HTML output in Bash 5.2 and newer#2317

Merged
drwetter merged 1 commit intotestssl:3.1devfrom
dcooper16:fix_html
Feb 4, 2023
Merged

Fix HTML output in Bash 5.2 and newer#2317
drwetter merged 1 commit intotestssl:3.1devfrom
dcooper16:fix_html

Conversation

@dcooper16
Copy link
Copy Markdown
Collaborator

As noted in #2304, the way that the '&' character is treated in the string part of a pattern substitution changed in Bash 5.2. As a result, the change that was made in #1481 to accommodate older versions of Bash (e.g., on MacOS) now causes testssl.sh to produce incorrect HTML output when run on Bash 5.2.

This PR encodes the '&' characters in the substitution strings in a way that produces correct results on multiple versions of Bash (3.2 on MacOS, 5.2 on Ubuntu 23.10, 5.0 on Ubuntu 20.04).

As noted in testssl#2304, the way that the '&' character is treated in the string part of a pattern substitution changed in Bash 5.2. As a result, the change that was made in testssl#1481 to accommodate older versions of Bash (e.g., on MacOS) now causes testssl.sh to produce incorrect HTML output when run on Bash 5.2.

This commit encodes the '&' characters in the substitution strings in a way that produces correct results on multiple versions of Bash (3.2 on MacOS, 5.2 on Ubuntu 23.10, 5.0 on Ubuntu 20.04).
@drwetter drwetter merged commit 05b4cdc into testssl:3.1dev Feb 4, 2023
@dcooper16 dcooper16 deleted the fix_html branch February 6, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants