Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overly eager sed commands #122

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

jsf9k
Copy link
Member

@jsf9k jsf9k commented Sep 13, 2022

🗣 Description

This pull request tightens a few sed commands so that their regexes do not inadvertently match when they should not.

💭 Motivation and context

We saw in cisagov/postfix-docker#47 that the sed commands in the bump_version.sh script could inadvertently match the CC0 version in the README.md file. This change escapes the periods in the version before passing it on to sed so that they only match periods and not just any character.

🧪 Testing

I tested locally and verified that with these changes the situation that arose in cisagov/postfix-docker#47 does not occur.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

@jsf9k jsf9k added the bug This issue or pull request addresses broken functionality label Sep 13, 2022
@jsf9k jsf9k self-assigned this Sep 13, 2022
@jsf9k jsf9k marked this pull request as ready for review September 13, 2022 14:08
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the cleanup here!

Copy link
Member

@mcdonnnj mcdonnnj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable enough.

@jsf9k jsf9k added the blocked This issue or pull request is awaiting the outcome of another issue or pull request label Sep 13, 2022
cisagovbot pushed a commit that referenced this pull request Nov 9, 2022
We saw in cisagov/postfix-docker#47 that the sed commands in the
bump_version.sh script could inadvertently match the CC0 version in
the README.md file.  This change escapes the periods in the version
before passing it on to sed so that they only match periods and not
just any character.
@mcdonnnj mcdonnnj force-pushed the bugfix/tighten-regex-in-version-script branch from 376198c to 1a8ab89 Compare November 21, 2022 23:10
@mcdonnnj mcdonnnj merged commit 8f09cbf into develop Nov 21, 2022
@mcdonnnj mcdonnnj deleted the bugfix/tighten-regex-in-version-script branch November 21, 2022 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request is awaiting the outcome of another issue or pull request bug This issue or pull request addresses broken functionality
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants