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

proxy: Update trimTrailingEOL function to handle carriage return (\r) #3799

Merged
merged 2 commits into from
Aug 24, 2023

Commits on Aug 23, 2023

  1. proxy: Update trimTrailingEOL function to handle carriage return (\r)

    It will fix the proxy parse issue in case user update the cert on
    windows and add blank line at the end of certificate. Unit test is also
    added for same.
    
    When the cert file ends with \r\n, trimTrailingEOL would only remove \n
    and the file will end with \r. Then this causes issues in regexp which
    only replace `\r\n` => `\n` but doesn't perform any action for `\r` and
    eventualy turn up this bug.
    
    fixes: crc-org#3785
    praveenkumar committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e0619ed View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Move TrimTrailingEOL helper to pkg/strings

    Looks like we are using `strings.TrimRight(<string>, "\n\r")` at
    multiple locations so better to move this helper to pkg/strings for
    better maintainance.
    praveenkumar committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    799787a View commit details
    Browse the repository at this point in the history