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

GetBucketPolicy broken by PR #3276 #3286

Closed
1 task done
odormond opened this issue Oct 23, 2024 · 6 comments
Closed
1 task done

GetBucketPolicy broken by PR #3276 #3286

odormond opened this issue Oct 23, 2024 · 6 comments
Labels
bug This issue is a confirmed bug. closing-soon p0 This issue is the highest priority potential-regression Marking this issue as a potential regression to be checked by team member s3

Comments

@odormond
Copy link

Describe the bug

Trying to get a bucket policy consistently fails with fake error 500 Internal Server Error.

The issue comes from PR #3276 forcibly trying to parse the body as an XML document and failing as it's a JSON document and then considering it _looks_like_special_case_error due to this line:

return True

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The bucket policy document is returned successfully.

Current Behavior

An error is ClientError is raised.

Reproduction Steps

With adequate permissions, and a bucket with some policy configured, run:

aws --debug s3api get-bucket-policy --bucket test-bucket-with-policy

Possible Solution

Don't feed a response body whose header says Content-Type: application/json to an XML parser.

Additional Information/Context

No response

SDK version used

1.35.45

Environment details (OS name and version, etc.)

Ubuntu 22.04.5 LTS

@odormond odormond added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Oct 23, 2024
@github-actions github-actions bot added the potential-regression Marking this issue as a potential regression to be checked by team member label Oct 23, 2024
@tim-finnigan tim-finnigan added p0 This issue is the highest priority s3 labels Oct 23, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reporting, the team in looking into this issue and will post updates here.

@tim-finnigan tim-finnigan removed the needs-triage This issue or PR still needs to be triaged. label Oct 23, 2024
@tim-finnigan
Copy link
Contributor

Linking PR including fix: #3288, which should be released soon.

@mukitmomin
Copy link

@tim-finnigan just confirming, is this fix to be released in v1.35.46 or the following release? I'm seeing the same error with botocore=v1.35.46 right now.

@nateprewitt
Copy link
Contributor

@mukitmomin the fix for GetBucketPolicy should be available in our next release. You can track releases in our tags or via PyPI. We'll also post here once it's available.

@tim-finnigan
Copy link
Contributor

@mukitmomin - release 1.35.47 is now out, please update your version of boto3/botocore in order to have access to this fix.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. closing-soon p0 This issue is the highest priority potential-regression Marking this issue as a potential regression to be checked by team member s3
Projects
None yet
Development

No branches or pull requests

4 participants