-
Notifications
You must be signed in to change notification settings - Fork 88
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
Allow custom signed headers in Signed URLs #130
Comments
Also required @ThouCheese without this users can upload 5TB files openly.. |
For now, the |
@bluelhf any example? Can't seem to find one with signed headers |
@bluelhf I try this for example, but it doesn't work, it's ignored.
|
@bluelhf there is no way to put content length on |
I am using it in my own code like this: let uuid = Uuid::new_v4();
let url = self.client.signed_url(
&self.bucket_name,
&uuid.to_string(),
None, None, SignedURLOptions {
method: SignedURLMethod::PUT,
headers: vec![format!("Content-Length: {length}")],
expires: Duration::from_secs(1800),
..Default::default()
}
).await?;
Ok(UploadHandle { url, uuid }) (from here) |
@bluelhf that only 'allows' client side headers on request which means users can still upload 5TB files to you service. It does not enforce a file size limit. |
@bluelhf just try it, set the content size really low, then upload a larger file with the url. Nothing will happen or reject. Very dangerous to allow that. |
I remember trying it and the request getting rejected after the file exceeded the reported size. Maybe I'm misremembering though, I'll have to try |
@bluelhf I just tried it before, it wasn't working as intended. I could upload files way past the content length. |
Support for custom signed headers in Signed URLs would allow, for example, limiting the file size of an upload by specifying a signed
Content-Length
value :)The text was updated successfully, but these errors were encountered: