diff options
author | Alexander Tkachev | 2019-07-26 11:40:52 +0700 |
---|---|---|
committer | Matan Bareket | 2019-07-30 14:51:41 -0400 |
commit | 85431c39bf191725910703f699fe95da595f6adf (patch) | |
tree | 8ce74202128b198ba06efce719b2ac258c3e0526 | |
parent | e7ca2b8db02aee7f4893964f13f2f708d0a3b695 (diff) | |
download | scummvm-rg350-85431c39bf191725910703f699fe95da595f6adf.tar.gz scummvm-rg350-85431c39bf191725910703f699fe95da595f6adf.tar.bz2 scummvm-rg350-85431c39bf191725910703f699fe95da595f6adf.zip |
CLOUD: Change interaction with /refresh endpoint
Refresh token is now passed as custom HTTP header, not in GET parameter,
to prevent them being written into server logs.
-rw-r--r-- | backends/cloud/basestorage.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/cloud/basestorage.cpp b/backends/cloud/basestorage.cpp index bb198120ff..ea54a97fd9 100644 --- a/backends/cloud/basestorage.cpp +++ b/backends/cloud/basestorage.cpp @@ -139,8 +139,9 @@ void BaseStorage::refreshAccessToken(BoolCallback callback, Networking::ErrorCal if (errorCallback == nullptr) errorCallback = getErrorPrintingCallback(); - Common::String url = Common::String::format("https://cloud.scummvm.org/%s/refresh?code=%s", cloudProvider().c_str(), _refreshToken.c_str()); + Common::String url = Common::String::format("https://cloud.scummvm.org/%s/refresh", cloudProvider().c_str()); Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, url); + request->addHeader("X-ScummVM-Refresh-Token: " + _refreshToken); addRequest(request); } |