aboutsummaryrefslogtreecommitdiffstats
path: root/src/file_upload.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rename `file_upload` to `file_op`cyqsimon2023-09-051-228/+0
| | | | - This is in preparation for adding deletion code
* Rewrite `contains_symlink`cyqsimon2023-09-051-8/+20
|
* Create shared file utiity modulecyqsimon2023-07-101-85/+2
|
* Tidy up some importsSven-Hendrik Haase2022-09-201-3/+4
|
* Return 403 instead of 500 for upload errsJonas Diemer2022-09-191-3/+1
|
* cargo fmtJonas Diemer2022-09-181-6/+8
|
* sanitize allowed upload paths for cases like ./dirJonas Diemer2022-09-181-1/+1
|
* clarity of commentJonas Diemer2022-09-181-1/+1
| | | Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
* Update src/file_upload.rsJonas Diemer2022-09-181-1/+1
| | | Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
* Renamed option for more clarityJonas Diemer2022-09-181-3/+2
|
* cleaned up code using any()Jonas Diemer2022-09-181-11/+5
|
* Switched to use of PathBuf, fixed for subdirsJonas Diemer2022-09-181-3/+8
|
* Added option restrict-upload-dirJonas Diemer2022-09-181-0/+13
|
* Create directory (#781)Sheepy2022-06-261-16/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ability to make directory Frontend for making directories Fix potential security vulnerability (CWE-23) Add tests Update README.md Disallow using parent directories altogether Fix formatting Fix clippy warnings Address review comments Update README.md Change `making` to `creation` Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com> Have make directory flag require file upload flag Address review comments * Disallow uploading files and making directories through symlinks when disabled * Add test * Clippy formatting changes * Add test doc comment
* Bump actix-web to v4.0-beta.15jikstra2021-12-281-9/+6
| | | | Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* Adress review commentsAli MJ Al-Nasrawy2021-09-041-2/+39
|
* file_upload.rs: sanitize path inputAli MJ Al-Nasrawy2021-09-011-10/+42
| | | | Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* Fix clippy::too_many_arguments and rework error ..Ali MJ Al-Nasrawy2021-08-301-142/+25
| | | | | | | | | | | | | | | | | | | | | ... page rendering Too many arguments are moved around and many of them are already stored in MiniserveConfig. Many of these are used to render error pages. To fix this issue, it was necessary to rework error page rendering: 1. Implement `ResponseError` for `ContextualError` so that it can be returned from service handlers as is and will then be automatically logged to the console and converted into an error response. 2. At service handler level, all error responses are now rendered as plain text. 3. 'error_page_middleware' is now responsible for the rendering of the final error page from plain text reponses. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
* file_upload.rs: use async/awaitAli MJ Al-Nasrawy2021-08-281-133/+100
| | | | | ... and rewrite {save_file, handle_multipart} ... and fix clippy warning about create_error_response() being always Ok()
* migrate to actix-web v4.0-betaAli MJ Al-Nasrawy2021-08-281-1/+1
|
* Fix lintsSven-Hendrik Haase2021-06-281-2/+2
|
* Refuse to start without explicit path if not attached to interactive terminalSven-Hendrik Haase2021-03-281-3/+1
|
* Fix clippy warningTamas Levai2021-03-011-0/+1
|
* Add program version footerTamas Levai2021-02-281-0/+7
|
* Fix lintsSven-Hendrik Haase2021-02-191-5/+5
|
* restore default theme cli option and add default theme dark optionLukas Stabe2020-10-011-0/+17
|
* move css out of html into its own routeLukas Stabe2020-09-261-0/+7
|
* [wip] client-side color-scheme handlingLukas Stabe2020-09-251-15/+0
|
* Add embedded favicon (fixes #364)Sven-Hendrik Haase2020-09-241-0/+7
|
* Update to actix 2 and futures 0.3equal-l22020-07-211-74/+65
|
* Make clippy and cargo fmt happySven-Hendrik Haase2020-06-261-1/+1
|
* Format everythingSven-Hendrik Haase2020-03-111-6/+6
|
* Merge pull request #239 from DamianX/FixClippyWarningsSven-Hendrik Haase2020-02-271-1/+1
|\ | | | | Fixed clippy warnings
| * Fixed clippy warningsDamian2019-12-201-1/+1
| |
* | Fix Clippy warningboastful-squirrel2019-08-161-0/+1
| |
* | Do not 'back to listing' link when random route is setboastful-squirrel2019-08-161-1/+7
|/
* Add dynsSven-Hendrik Haase2019-06-091-2/+2
|
* Return QueryParameters struct instead of tupleboastful-squirrel2019-05-031-11/+11
|
* Read query params to handle error back linkboastful-squirrel2019-05-021-41/+18
|
* Cargo fmtboastful-squirrel2019-05-021-2/+3
|
* Use HTTP StatusCode for error titleboastful-squirrel2019-05-011-1/+8
|
* Merge branch 'master' into themed-errorsboastful-squirrel2019-04-271-24/+23
|\
| * Combine ContextualError and ContextualErrorKind into onekhai96_2019-04-271-16/+16
| |
* | Improved some errorsboastful-squirrel2019-04-271-1/+1
| |
* | Themed errorsboastful-squirrel2019-04-271-22/+86
| |
* | Merged query parameter structs + improved file upload errorsboastful-squirrel2019-04-261-21/+33
|/
* Merge branch 'master' into no_panicsboastful-squirrel2019-04-251-4/+5
|\
| * Add a couple more integration testsSven-Hendrik Haase2019-04-241-4/+5
| |
* | Properly log error + added render_error methodboastful-squirrel2019-04-211-6/+6
| |
* | Print upload/archive errors also in terminalboastful-squirrel2019-04-211-0/+1
| |