Fix signature generation when using a proxy server in boto/auth.py #1076

Merged
merged 1 commit into from Oct 24, 2012

Conversation

Projects
None yet
2 participants
Contributor

g2harris commented Oct 23, 2012

When using a proxy server AWSAuthConnection.build_base_http_request will modify the http_request.path to include the host header. It caches the original path in the auth_path field so that the signature can be later correctly generated.

Both the HMACAuthV3HTTPHandler and HMACAuthV4HTTPHandler signature generation methods in auth.py look at the path field and not the cached original auth_path which means boto will generate an incorrect signature when using a proxy server.

This patch updates those signature generation methods to use auth_path instead of path.

Update boto/auth.py
When using a proxy server AWSAuthConnection.build_base_http_request will modify the http_request.path to include the host header.  It caches the original path in the auth_path field so that the signature can be later correctly generated. 

Both the HMACAuthV3HTTPHandler and HMACAuthV4HTTPHandler signature generation methods in auth.py look at the original path and not auth_path which means boto will generate an incorrect signature when using a proxy server.

This patch updates those signature generation methods to use auth_path instead of path.

@garnaat garnaat merged commit b6d9db6 into boto:develop Oct 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment