Skip to content
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

setcors on file puts file #1386

Open
StefanBrand opened this issue Jun 17, 2024 · 0 comments
Open

setcors on file puts file #1386

StefanBrand opened this issue Jun 17, 2024 · 0 comments

Comments

@StefanBrand
Copy link

I mistakenly used setcors on a file. It seems to silently overwrite the file.

Steps to reproduce

$ echo '<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
' >  cors_config.xml
$ s3cmd setcors cors_config.xml s3://test-bucket/test.txt
$ s3cmd get s3://stefans-bucket/test.txt -
download: 's3://stefans-bucket/test.txt' -> '-'  [1 of 1]
 378 of 378   100% in    0s  1381.92 B/s<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>
 378 of 378   100% in    0s  1378.01 B/s  done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant