From 9d597fdcb72c7defabf92f0cfb1be6bc28377d55 Mon Sep 17 00:00:00 2001 From: keita Date: Wed, 17 Feb 2021 14:04:22 +0900 Subject: [PATCH] =?UTF-8?q?hmacsha1=E3=82=92url=E3=82=A8=E3=83=B3=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=99=E3=82=8B=E7=AE=87=E6=89=80=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cocoatweet/api/status/update.cc | 2 +- src/cocoatweet/oauth/oauth.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cocoatweet/api/status/update.cc b/src/cocoatweet/api/status/update.cc index 5d689e1..bc36ae4 100644 --- a/src/cocoatweet/api/status/update.cc +++ b/src/cocoatweet/api/status/update.cc @@ -53,7 +53,7 @@ void Update::process(std::weak_ptr _oauth, { std::vector tmp; for (const auto& [key, value] : oauthParam) { - tmp.push_back(key + "=" + value); + tmp.push_back(key + "=" + CocoaTweet::Util::urlEncode(value)); } std::stringstream os; std::copy(tmp.begin(), tmp.end(), std::ostream_iterator(os, ",")); diff --git a/src/cocoatweet/oauth/oauth.cc b/src/cocoatweet/oauth/oauth.cc index 2331b0c..6ac8217 100644 --- a/src/cocoatweet/oauth/oauth.cc +++ b/src/cocoatweet/oauth/oauth.cc @@ -43,7 +43,7 @@ std::map OAuth1::signature( std::cout << "hmac-sha1 : " << k64Sha1 << std::endl; auto ret = std::map{ - {"oauth_signature", CocoaTweet::Util::urlEncode(k64Sha1)}}; + {"oauth_signature", k64Sha1}}; return ret; }