From 7001361c64e4629f091e2f33214a691bcad80782 Mon Sep 17 00:00:00 2001 From: cpsievert Date: Tue, 9 Feb 2016 12:07:22 +0900 Subject: [PATCH 1/2] Ensure that we always return HTTPS links. Fixes #455 --- R/process.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/process.R b/R/process.R index 412f0a863e..7f13d59104 100644 --- a/R/process.R +++ b/R/process.R @@ -9,6 +9,8 @@ process <- function(resp) { process.clientresp <- function(resp) { httr::stop_for_status(resp) con <- from_JSON(httr::content(resp, as = "text")) + # make sure that we always return a HTTPS link + con$url <- sub("^http[s]?:", "https:", con$url) if (nchar(con$error) > 0) stop(con$error, call. = FALSE) if (nchar(con$warning) > 0) warning(con$warning, call. = FALSE) if (nchar(con$message) > 0) message(con$message, call. = FALSE) @@ -27,6 +29,8 @@ process.figure <- function(resp) { con <- from_JSON(content(resp, as = "text")) fig <- con$payload$figure fig$url <- sub("apigetfile/", "~", resp$url) + # make sure that we always return a HTTPS link + con$url <- sub("^http[s]?:", "https:", con$url) fig <- add_boxed(fig) fig$data[[1]]$inherit <- FALSE # any reasonable way to return a data frame? From 24ecc98bc05bbbd41dd1649f58f7ea1db235f9aa Mon Sep 17 00:00:00 2001 From: cpsievert Date: Thu, 11 Feb 2016 09:55:45 +0900 Subject: [PATCH 2/2] bump version; update news --- DESCRIPTION | 2 +- NEWS | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index db2ca201b7..7439fb415b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: plotly Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library -Version: 2.4.2 +Version: 2.4.3 Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"), email = "cpsievert1@gmail.com"), person("Chris", "Parmer", role = c("aut", "cph"), diff --git a/NEWS b/NEWS index c1374ce92c..61a7183d92 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +2.4.3 -- 11 Feb 2015 + +Ensure that we always return HTTPS links. Fixes #455 + 2.4.2 -- 9 Feb 2015 Fix for on-premise domain configuration.