File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,10 @@ async def s3_endpoint(path: str, request: Request):
180180 # get the name of the user's bucket and ensure the user is making a call to their own bucket
181181 logger .info (f"Incoming S3 request from user '{ user_id } ': '{ request .method } { path } '" )
182182 user_bucket = aws_utils .get_safe_name_from_hostname (user_id )
183+ if request .method == "GET" and path == "s3" :
184+ err_msg = f"'ls' not supported, use 'ls s3://{ user_bucket } ' instead"
185+ logger .error (err_msg )
186+ raise HTTPException (HTTP_400_BAD_REQUEST , err_msg )
183187 request_bucket = path .split ("?" )[0 ].split ("/" )[0 ]
184188 if request_bucket != user_bucket :
185189 err_msg = f"'{ path } ' (bucket '{ request_bucket } ') not allowed. You can make calls to your personal bucket, '{ user_bucket } '"
You can’t perform that action at this time.
0 commit comments