summaryrefslogtreecommitdiff
path: root/imap/src/c-client/oauth2_aux.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-10-27 21:07:45 -0600
committerEduardo Chappa <chappa@washington.edu>2021-10-27 21:07:45 -0600
commit248f45578fcf93b56e3b97c52cfd21b5b84f2a38 (patch)
tree411f3e2e25ebe1e33cbff4994477dc7a18dfa38f /imap/src/c-client/oauth2_aux.c
parent4e924cc7aeb4edceb84d43d97f0542539f614cdd (diff)
downloadalpine-248f45578fcf93b56e3b97c52cfd21b5b84f2a38.tar.xz
* Contributions by Thomas Uhle:
. Add support to the LDAP attribute "userCertificate"; . Move voiceMailTelephoneNumber from the TCL side to ldap_translate; . XOAUTH2 state generator changes format specifier from %x to %02x; . Clear compiler warnings and correct spelling in documentation. . Web Alpine will not attempt to continue a postponed message if the postponed-msgs folder is empty.
Diffstat (limited to 'imap/src/c-client/oauth2_aux.c')
-rw-r--r--imap/src/c-client/oauth2_aux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/imap/src/c-client/oauth2_aux.c b/imap/src/c-client/oauth2_aux.c
index d2ad6ce6..a0828ba4 100644
--- a/imap/src/c-client/oauth2_aux.c
+++ b/imap/src/c-client/oauth2_aux.c
@@ -34,19 +34,19 @@ char *oauth2_generate_state(void)
rv[0] = '\0';
for(i = 0; i < 4; i++)
- sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
+ sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
+ sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
+ sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 2; i++)
- sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
+ sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256));
sprintf(rv + strlen(rv), "%c", '-');
for(i = 0; i < 6; i++)
- sprintf(rv + strlen(rv), "%x", (unsigned int) (random() % 256));
+ sprintf(rv + strlen(rv), "%02x", (unsigned int) (random() % 256));
rv[36] = '\0';
return cpystr(rv);
}