mattwarkentin/fidelius

Password setting and file size

Hyunsoolol opened this issue ยท 17 comments

Hi. I am trying to set a password for an html file using the charm function.

However, it seems that the password is not properly set when the file size is large.

The html file I'm using is about 6000 KB to 8000 KB, but it doesn't take a password. Please check :)

Hi @Hyunsoolol,

Thanks for filing an issue. What do you mean when you say the password is not properly set? Could you elaborate?

Also, are you able to share a snippet of the code you're running? It may help diagnose the issue.

The running code is below.
(Nothing speical)

charm("test.html", password = "pw1234!")

If the size of 'test.html' exceeds 6000KB, it will not open even if you enter the set password 'pw1234!'

Thank you.

Hi! I have the same issue, however for me it stopped working once the file size is over 11MB (The encrypted version). I have recreated it a couple of times. Building the report om Debian 10 with the very straight forward configuration bellow. I've tried opening the encrypted report in safari and Chrome. I'm not rendering any large chunks (like in #7). I have tried to just remove item after item and when the file size is bellow 11 MB, it starts working again. Unfortunately, I can't share the Markdown with you as it contains sensitive information.

output:
  fidelius::html_password_protected:
    password: "test"

Thank you for creating this great package, it has been so useful!

Hi :) How are you?
I posted a comment above, but it didn't respond, so I'm writing it again.

I am using R to set a password for an html document using the 'charm' function of the 'fidelius' package.
The problem is that when the size of the html document is large, it does not work even if the password for the document is entered.

image

Can you tell me how to solve this part?

Thank you

Can you check what error shows up in the console when you try to authenticate in your browser? If you are using Chrome, you can do this by loading the document, right-clicking anywhere on the page and clicking "Inspect" and then clicking "Console" near the top of the page. Once the console is in view, try entering the password and please let me know what error is thrown.

This is the result of checking after I entered the previously set password. what should i do?

image

Hi @Hyunsoolol,

This is the CSS stylesheet, not the JS console. Can you please show the output shown in the console?

hi @mattwarkentin

i have the same problem. this is my console output:
image

hope this helps and thanks in advance!

Hello!

I'm also having the same issue as @tracits , unfortunately.

I have five pages full of plots that I need password protected to share among a private group of collaborators. For pages with only ~40-50 plots and around ~10mb, I'm able to password protect it just as the package intends.

For pages than have >50 plots that exceed 11mb, the password no longer works and I'm unable to access the page. It "shakes" and implies that the entered password is incorrect. I've tried different passwords, deleting and re-knitting, and nothing seems to work. (Some comfort in that others seem to be having the file size-password error issue!)

Would be enormously grateful to any solution!

Another detail to add:

For one page, knitting with preview: true (i.e. no password protection) produces an .html file size of 12mb. However, when removing the preview option and producing a password protected .html page, the file size jumps up to 23mb.

Thanks for all the information. I have some ideas for how to perhaps fix this. Working on it now and will report back soon.

Thank you :) @mattwarkentin

Hello everyone, I have the same issue. Here is my contribution: a fully reproducible Rmd example that includes the data :)

@mattwarkentin can you try it?

https://remi-theriault.com/scripts/priming3.Rmd

The resulting encrypted file size is 14.9 MB (original file size is 7.27 MB), and the message I get in the browser console is:

iming3.html:332 Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

Note that changing the dpi to 50, with

```{r setup, include=FALSE}
knitr::opts_chunk$set(dpi = 50)
```

Also solves the issue for that file, just like in #7. So folks if you don't need high DPI (which you probably don't), this is probably the best workaround for those big files for now.

same issue here, any solution now?

Thank u for ur great work!

Thanks for all the information. I have some ideas for how to perhaps fix this. Working on it now and will report back soon.

Same issue. Works when I comment out sections of the Rmd file to reduce file size, but password is refused when file size is large (in my case, 15.8 MB). Neat package, and a fix here would be great!

I have this issue even with only 6mb file. So it might not be only related to filesize, but the contents inside your html. Developer didn't respond in more than a year, so this issue might not get resolved ever. If you can work with nodejs, here is an alternative. It also has an online tool where you can just copy paste your html, encrypt and download password protected file.
This package is very useful and I hope the developer finds time to update.

Update: pagecryptr package did the job for me. It also didn't increase filesize that much (~2mb). Although its development also seems to be halted and need to be installed from github.

Update: if you use microsoft as mail service provider you can't receive pagecrypt output file as it will be held by microsoft as "high confidence" phishing email. Gmail receives fine.