Bugfix: Do not assume client_id, client_secret and token are hexadecimal.
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
0cbfb415b5
commit
ffaf4a551a
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.6)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.30.0
|
||||
VERSION 0.30.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
|
|
@ -182,8 +182,8 @@ uint_fast16_t API::register_app1(const string &client_name,
|
|||
if (ret == 0)
|
||||
{
|
||||
std::smatch match;
|
||||
std::regex reid("client_id\":\"([0-9a-fA-F]+)\"");
|
||||
std::regex resecret("client_secret\":\"([0-9a-fA-F]+)\"");
|
||||
std::regex reid("client_id\":\"([^\"]+)\"");
|
||||
std::regex resecret("client_secret\":\"([^\"]+)\"");
|
||||
|
||||
std::regex_search(answer, match, reid);
|
||||
client_id = match[1].str();
|
||||
|
@ -244,7 +244,7 @@ uint_fast16_t API::register_app2(const string &client_id,
|
|||
if (ret == 0)
|
||||
{
|
||||
std::smatch match;
|
||||
std::regex retoken("access_token\":\"([0-9a-fA-F]+)\"");
|
||||
std::regex retoken("access_token\":\"([^\"]+)\"");
|
||||
|
||||
std::regex_search(answer, match, retoken);
|
||||
access_token = match[1].str();
|
||||
|
|
Reference in New Issue