Skip to content

Commit a11740f

Browse files
authored
Avoid partial matching of "refresh_token" (#697)
A global search for `\w+\$\w+\s*<-` finds a ton of results. Is there a way to make this safer globally? See #696 for the full description of why this is an issue here, but the same "editing a list that we don't fully own" issue could be important in a lot of other places in this package. Closes #696.
1 parent 1a9292d commit a11740f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/oauth-token.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ token_refresh <- function(client, refresh_token, scope = NULL, token_params = li
8080
scope = scope,
8181
!!!token_params
8282
)
83-
out$refresh_token <- out$refresh_token %||% refresh_token
83+
out$refresh_token <- out[["refresh_token"]] %||% refresh_token
8484
out
8585
}

R/utils.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ create_progress_bar <- function(total,
251251
)
252252
}
253253

254-
args$name <- args$name %||% name
254+
args$name <- args[["name"]] %||% name
255255
# Can be removed if https://github.com/r-lib/cli/issues/630 is fixed
256256
if (is.infinite(total)) {
257257
total <- NA

0 commit comments

Comments
 (0)