-
-
Notifications
You must be signed in to change notification settings - Fork 813
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
Add support for extension user files #3433
Add support for extension user files #3433
Conversation
Extension user files can be stored easily in the user folder instead of the static folder.
Please let me know if something is missing. |
@@ -48,7 +53,12 @@ function is_valid_path_extension($path, $extensionPath) { | |||
return false; | |||
} | |||
|
|||
// File to serve must be under a `ext_dir/static/` directory. | |||
// User files do not need further validations | |||
if (!$isStatic) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not allow arbitrary paths in the filesystem, so $path
needs to be constrained somehow, at least preventing things such as ../
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This validation is skipped only for files generated by the extension configuration in the user folder. And the validation specifies that it must be in the user folder.
I am confused why we should be testing static for those files. Because in the event of the use of ../
, it has to be contained in the user folder. So I guess the risks are really low.
Details later. Due to FreshRSS#3433 (1.18.0)
Details later. Due to #3433 (1.18.0)
Details later. Due to #3433 (1.18.0)
Taking advantage of this PR: #6267 |
Closes #1709 (possibly)
Changes proposed in this pull request:
How to test the feature manually:
Pull request checklist:
Additional information can be found in the documentation.
Extension user files can be stored easily in the user folder instead of the
static folder.