Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport for OAUTHBEARER as per RFC 7628 #2487
Comments
|
I would say all the logic is in The code is computing the mech before the call to The method is called 4 times. This one must use the Lines 341 to 347 in de97b5f This one must use the Lines 554 to 555 in de97b5f This one must use the Lines 354 to 359 in de97b5f I'm not sure about this one: Line 565 in de97b5f |
|
It looks like this may be a very simple fix. I modified a single line in In the four places where I can't say that I've tested this thoroughly, but it does work when sending via gmail with I'll create a pull request containing the change. EDIT: eh, looks like pull requests aren't used much here. So how about a patch instead?
|
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
OAUTHBEARER tokens were incorrectly generated in a format similar to XOAUTH2 tokens. These changes make OAUTHBEARER tokens conform to the RFC7628. Fixes: curl#2487 Reported-by: Paolo Mossino
I did this
CURL is sending this:
GMail IMAP is answering with:
Decoding the token:
Generate this:
As per RFC 7628 I think this is not correct, and I would expect the token to be formatted in this way:
If I provide this to GMail, it works.
The syntax with simply user=,auth= is suitable for method XOAUTH2 instead.
I tried to generate the different syntax and then try directly with OpenSSL to confirm what works and what not.
I expected the following
Unless there are other RFC outdating RFC 7628 (which I didn't found), I would expect cURL to do one of the following:
Workaround (partial) is to use a request in the form:
but it seems cURL supports only one request at a time, so this would will not play well with a folder listing operation.
curl/libcurl version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy
curl 7.59.0 (x86_64-apple-darwin17.3.0) libcurl/7.59.0 SecureTransport zlib/1.2.11
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
operating system
Mac OS 10.13.3