Skip to content

Make sure date -r hits a dir readable#3012

Merged
drwetter merged 1 commit into3.3devfrom
fix_3009_date-detection
Apr 7, 2026
Merged

Make sure date -r hits a dir readable#3012
drwetter merged 1 commit into3.3devfrom
fix_3009_date-detection

Conversation

@drwetter
Copy link
Copy Markdown
Collaborator

@drwetter drwetter commented Apr 7, 2026

When checking early for date flavors, there might be an edge case when a directory with a referred file (for the date command) isn't readable which might cause testssl.sh to not detect the date flavor correctly.

This fixes that (#3009) by cd'ing to / in a subshell which should be cd'able and readable under every platform.

What is your pull request about?

  • Bug fix
  • Improvement
  • New feature (adds functionality)
  • Breaking change (bug fix, feature or improvement that would cause existing functionality to not work as expected)
  • Typo fix
  • Documentation update
  • Update of other files

If it's a code change please check the boxes which are applicable

  • For the main program: My edits contain no tabs, indentation is five spaces and any line endings do not contain any blank chars
  • I've read CONTRIBUTING.md and Coding_Convention.md
  • I have tested this fix or improvement against >=2 hosts and I couldn't spot a problem
  • I have tested this new feature against >=2 hosts which show this feature and >=2 host which does not (in order to avoid side effects) . I couldn't spot a problem
  • For the new feature I have made corresponding changes to the documentation and / or to help()
  • If it's a bigger change: I added myself to CREDITS.md (alphabetical order) and the change to CHANGELOG.md

When checking early for date flavors, there might be an edge case when
a directory with a referred file (for the date command) isn't readable
which might cause testssl.sh to not detect the date flavor correctly.

This fixes that by cd'ing to / in a subshell which should be cd'able
and readable under every platform.
@drwetter drwetter merged commit 3f9eb84 into 3.3dev Apr 7, 2026
5 checks passed
@drwetter drwetter deleted the fix_3009_date-detection branch April 7, 2026 14:02
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.

1 participant