fmmattioni / downloadthis

Implement Download Buttons in rmarkdown 💾
https://fmmattioni.github.io/downloadthis/
Other
147 stars 4 forks source link

malware #15

Closed charlesbaillie closed 2 months ago

charlesbaillie commented 3 years ago

Hi This is such a great package - thanks! However, I've come across an issue O365 virus detection does not like HTMLs produced with it. I've been through the source code and can't see anything malicious, however, emails bounce and I've been locked out by our security team. 😢 Using version 0.2.1 from CRAN.

Here's a MWE:

---
title: "Malware Test"
output: html_document
---

# Nice table with button
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)
library(downloadthis)
library(kableExtra)

data(mtcars)

knitr::kable(mtcars)

mtcars %>% download_this(
    output_name = "table",
    output_extension = ".csv",
    button_label = "Download table",
    button_type = "default",
    has_icon = TRUE
  )
fmmattioni commented 3 years ago

Hi @charlesbaillie!

That is weird - how are you sharing your HTML file? As an attachment to an email? When you add the download button, it will embed the content into the HTML file, so that could be the reason, but I am not sure. I would suggest that you zip the file instead.

charlesbaillie commented 3 years ago

Thanks for getting back - agree its so weird! I've just been through the code with a fine tooth comb and nothing that would warrant this behavior. Unfortunately, these files will be downloaded through an app by any number of people who would then need to zip before sending and I can't see that happening or being user friendly. I'll see what I can get from Microsoft and get back to you. Such a shame - think this is such a useful package!

fmmattioni commented 3 years ago

I am closing this, as I don't think it is an issue with {downloadthis}. Feel free to re-open it or create a new issue in case needed.

bc-teixeira commented 4 months ago

I just had a similar situation now with version 0.3.3.

fmmattioni commented 4 months ago

sorry to hear that @bc-teixeira.. reopening this to investigate how the HTML file is getting flagged for this.. could be due to the embedded content

fmmattioni commented 2 months ago

can you let me know if installing version 0.4.0 solves this issue?

bc-teixeira commented 2 months ago

@fmmattioni I tested it with the same code I was having malware issues before and I had no issues anymore. Thanks