commit 0aa67d2a0f54df4e6ba8987194c835a5672eb32f
parent bf98204d78bbf31c6cb193a56f89912bb14be8dc
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date: Sat, 25 Mar 2023 12:05:11 +0100
fix(caldav): increase access token length
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/caldav.c b/src/caldav.c
@@ -1,8 +1,8 @@
#include "caldav.h"
CURL *curl;
-char access_token[200] = "";
-char refresh_token[200] = "";
+char access_token[210] = "";
+char refresh_token[210] = "";
int token_ttl = 0;
// Local bind address for receiving OAuth callbacks.
@@ -110,7 +110,7 @@ void update_global_token_vars(char* input) {
char* new_access_token = extract_json_value(input, "access_token", true);
tracepoint(diary, debug_string, "New access token", new_access_token);
if (new_access_token != NULL) {
- strncpy(access_token, new_access_token, 200);
+ strncpy(access_token, new_access_token, 210);
free(new_access_token);
}
@@ -128,7 +128,7 @@ void update_global_token_vars(char* input) {
// interactive authZ request from token code confirmed by the user
char* new_refresh_token = extract_json_value(input, "refresh_token", true);
if (new_refresh_token != NULL) {
- strncpy(refresh_token, new_refresh_token, 200);
+ strncpy(refresh_token, new_refresh_token, 210);
free(new_refresh_token);
}
}