File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
src/webserver/database/sqlpage_functions Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ mod function_definition_macro;
22mod function_traits;
33pub ( super ) mod functions;
44mod http_fetch_request;
5- mod url_parameters;
65mod s3;
6+ mod url_parameters;
77
88use sqlparser:: ast:: FunctionArg ;
99
Original file line number Diff line number Diff line change @@ -25,12 +25,15 @@ pub(super) async fn upload_to_s3<'a>(
2525 let web_root = & config. web_root ;
2626 let full_path = web_root. join ( file_path) ;
2727 if !full_path. starts_with ( web_root) {
28- anyhow:: bail!( "Security violation: Access denied to file outside web root" ) ;
28+ anyhow:: bail!( "Security violation: Access denied to file outside web root" ) ;
2929 }
30- tokio:: fs:: read ( & full_path) . await . map_err ( |e| {
31- log:: error!( "Failed to read file {}: {}" , full_path. display( ) , e) ;
32- e
33- } ) . with_context ( || format ! ( "Unable to read file {}" , full_path. display( ) ) ) ?
30+ tokio:: fs:: read ( & full_path)
31+ . await
32+ . map_err ( |e| {
33+ log:: error!( "Failed to read file {}: {}" , full_path. display( ) , e) ;
34+ e
35+ } )
36+ . with_context ( || format ! ( "Unable to read file {}" , full_path. display( ) ) ) ?
3437 } else {
3538 // Assume base64
3639 use base64:: Engine ;
You can’t perform that action at this time.
0 commit comments