Skip to content
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

Impossible to activate for all files in secure directory #43

Closed
guthypeter opened this issue May 2, 2019 · 2 comments
Closed

Impossible to activate for all files in secure directory #43

guthypeter opened this issue May 2, 2019 · 2 comments

Comments

@guthypeter
Copy link

guthypeter commented May 2, 2019

It is currently impossible to activate the extensionfor all files
We would like to configure the extension to secure all files in the secure directory. We tried to set the setting "basic.securedFiletypes" to ".*" which would match every extension, however this breaks the frontend (regex matches characters outside of the href= attribute). Then only setting that worked was [^'"]+ (which is clearly a hack, but matches everything until the closing " of the href attribute).

To Reproduce
Steps to reproduce the behavior:

  1. Install Secure Downloads 3.0.0
  2. Configure basic.securedFiletypes with .*
  3. Open page with secured file on it
  4. open secured file

Expected behavior

  • The secured file should be opened.
  • The page with the secured link should be rendered correctly.

Additional context
One setting, which we also tried, was .*? - this would match so few characters as possible (lazy) - but then we could not open the secured file, we got an error "Hash invalid! Access denied!"

@guthypeter
Copy link
Author

One of the possibilities would be to make the pattern for the opening and closing apostrophes mandatory (see https://regexr.com/4d996)

@flossels
Copy link
Contributor

Commit a00c061 introduces this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants