-
Notifications
You must be signed in to change notification settings - Fork 83
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
Hide token/key from casual inspection #675
Conversation
This obviously isn't fool proof, but should be enough to avoid accidentally disclosing in a log file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NEWS and accounts
adjustment.
@@ -303,8 +325,13 @@ accountInfo <- function(name = NULL, server = NULL) { | |||
info <- as.list(accountDcf) | |||
# remove all whitespace from private key | |||
if (!is.null(info$private_key)) { | |||
info$private_key <- gsub("[[:space:]]", "", info$private_key) | |||
info$private_key <- secret(gsub("[[:space:]]", "", info$private_key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does rsconnect::accounts
need the same adjustment?
This adjusts responses from the package API and should be included in NEWS.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accounts()
just includes name
and server
— did you mean servers()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that the certificates
field in servers()
is actually secret, but it is very long, so redacting it is a service to the user.
@toph-allen |
This obviously isn't fool proof, but should be enough to avoid accidentally disclosing in a log file.