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

Resolving newline in TriggerBinding param #953

Closed
wants to merge 1 commit into from

Commits on Feb 10, 2021

  1. Resolving newline in TriggerBinding param

    Closes tektoncd#942
    
    This PR resolves the bug by replacing all instances of the \n character
    in triggerbinding params with \n, thus encoding into JSON as the bytes
    92 110 rather than 10 or 13 10 depending on the system. This works in any
    instance where the parameter is substituted as the JSON encoding will resolve
    the parameter value after the byte array for the constructed rawMessage is
    assembled. Therefore, anywhere that the newline character is in one of these
    parameters, it will not encode appropriately in JSON.
    
    This was determined based on the existing tests that use \n in the label fields.
    Since the JSON encoder already operate successfully with those fields, we can look
    at the resultant byte array when those tests are run and determine the appropriate
    input that should be passed to the replace function in resource.go
    jmcshane committed Feb 10, 2021
    Configuration menu
    Copy the full SHA
    229f9e1 View commit details
    Browse the repository at this point in the history