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

Escape access request and access resolution reasons in tctl #9381

Merged
merged 2 commits into from
Dec 16, 2021

Conversation

espadolini
Copy link
Contributor

As request and resolution reasons can contain newlines, control characters and ANSI escape codes, we pass them through fmt.Printf("%q") like it's done in tsh.

This fixes TEL-Q321-5.

@espadolini espadolini self-assigned this Dec 14, 2021
@github-actions github-actions bot requested review from atburke and zmb3 December 14, 2021 10:17
@espadolini espadolini force-pushed the espadolini/tctl-escape-request-reason branch from 21ec21c to a74df57 Compare December 14, 2021 13:19
@russjones russjones requested review from fspmarshall and removed request for zmb3 December 15, 2021 19:50
tool/tctl/common/access_request_command.go Outdated Show resolved Hide resolved
@espadolini espadolini force-pushed the espadolini/tctl-escape-request-reason branch from 7800fb5 to 47bb43d Compare December 16, 2021 10:11
@espadolini espadolini force-pushed the espadolini/tctl-escape-request-reason branch from 47bb43d to 6b8941e Compare December 16, 2021 15:57
@espadolini espadolini enabled auto-merge (squash) December 16, 2021 15:58
@espadolini espadolini merged commit 879a3c1 into master Dec 16, 2021
@espadolini espadolini deleted the espadolini/tctl-escape-request-reason branch December 16, 2021 16:16
espadolini added a commit that referenced this pull request Dec 16, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 16, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 16, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 17, 2021
…9457)

* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 20, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 20, 2021
…9456)

* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 20, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 21, 2021
* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
espadolini added a commit that referenced this pull request Dec 21, 2021
…9455)

* Pass request and resolve reasons in tctl through %q like it's done in tsh

* Update tool/tctl/common/access_request_command.go

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>

Co-authored-by: Andrew Burke <[email protected]>
@webvictim webvictim mentioned this pull request Mar 4, 2022
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.

3 participants