You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2015/06/02 23:44:49 UTC
[2/2] qpid-proton git commit: PROTON-879: Restricted this fix for
only ANONYMOUS mech
PROTON-879: Restricted this fix for only ANONYMOUS mech
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a9468f60
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a9468f60
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a9468f60
Branch: refs/heads/master
Commit: a9468f60c2c4fbebd50d4c79dc60224e6894708c
Parents: 1d9eb12
Author: Andrew Stitcher <as...@apache.org>
Authored: Tue Jun 2 03:28:32 2015 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Tue Jun 2 14:58:22 2015 -0400
----------------------------------------------------------------------
proton-c/src/sasl/cyrus_sasl.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a9468f60/proton-c/src/sasl/cyrus_sasl.c
----------------------------------------------------------------------
diff --git a/proton-c/src/sasl/cyrus_sasl.c b/proton-c/src/sasl/cyrus_sasl.c
index 4add4ad..4bf5f4d 100644
--- a/proton-c/src/sasl/cyrus_sasl.c
+++ b/proton-c/src/sasl/cyrus_sasl.c
@@ -262,11 +262,13 @@ static int pni_wrap_server_start(pni_sasl_t *sasl, const char *mech_selected, co
const char *out;
unsigned outlen;
sasl_conn_t *cyrus_conn = (sasl_conn_t*)sasl->impl_context;
- // If we didn't get any initial response, pretend we got an empty response as it seems cyrus
- // assumes this is what it will get.
const char *in_bytes = in->start;
size_t in_size = in->size;
- if (!in_bytes) {
+ // Interop hack for ANONYMOUS - some of the earlier versions of proton will send and no data
+ // with an anonymous init because it is optional. It seems that Cyrus wants an empty string here
+ // or it will challenge, which the earlier implementation is not prepared for.
+ // However we can't just always use an empty string as the CRAM-MD5 mech won't allow any data in the server start
+ if (!in_bytes && strcmp(mech_selected, "ANONYMOUS")==0) {
in_bytes = "";
in_size = 0;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org