Created
June 22, 2009 10:45
-
-
Save poppen/133917 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a818f8ea7bdfc9437f98baae05036d677027fa61 Mon Sep 17 00:00:00 2001 | |
From: Shinsuke Matsui <[email protected]> | |
Date: Mon, 22 Jun 2009 19:44:20 +0900 | |
Subject: [PATCH] fixed bugs | |
--- | |
amazon-auth-proxy.cgi | 9 ++++++--- | |
1 files changed, 6 insertions(+), 3 deletions(-) | |
diff --git a/amazon-auth-proxy.cgi b/amazon-auth-proxy.cgi | |
index b0c1b40..15421a3 100755 | |
--- a/amazon-auth-proxy.cgi | |
+++ b/amazon-auth-proxy.cgi | |
@@ -38,13 +38,16 @@ def paapi( conf, params ) | |
qs = [].tap {|q| | |
params.each do |key, values| | |
if key == 'AWSAccessKeyId' | |
- q << "#{u key}=#{u conf.access_key}" | |
+ q << "#{u key}=#{u conf['access_key']}" | |
else | |
q << "#{u key}=#{u values[0]}" | |
end | |
end | |
- if params.keys.include?( 'AssociateTag' ) then | |
- q << "AssociateTag=#{u conf.default_aid}" | |
+ unless params.keys.include?( 'AssociateTag' ) then | |
+ q << "AssociateTag=#{u conf['default_aid']}" | |
+ end | |
+ unless params.keys.include?( 'Timestamp' ) then | |
+ q << "Timestamp=#{u DateTime.now.new_offset.strftime('%Y-%m-%dT%XZ') }" | |
end | |
}.sort | |
-- | |
1.6.2.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment