mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-21 07:06:40 +02:00
invalid_grant, error 70000
when trying to redeem an code, this error always occured, no matter which parts of the response uri/url that was used. the old regexp for parsing the code contained 3 groups, where as the actual code always was the last group, and the second group was either ? or &, and the first group would've been everything up until "code=". changed from a matching group to character class so there would only be two matching groups, so calling popFront() would actually leave the authorization code in the front.
This commit is contained in:
parent
5d821c4440
commit
a1e326f9b4
|
@ -75,7 +75,7 @@ final class OneDriveApi
|
|||
write(url, "\n\n", "Enter the response uri: ");
|
||||
readln(response);
|
||||
// match the authorization code
|
||||
auto c = matchFirst(response, r"(?:(\?|&)code=)([\w\d-]+)");
|
||||
auto c = matchFirst(response, r"(?:[\?|&]code=)([\w\d-]+)");
|
||||
if (c.empty) {
|
||||
log.log("Invalid uri");
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue