Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in authenicating using MD5 #1

Open
pgstath opened this issue May 9, 2014 · 3 comments · May be fixed by #2
Open

Error in authenicating using MD5 #1

pgstath opened this issue May 9, 2014 · 3 comments · May be fixed by #2

Comments

@pgstath
Copy link

pgstath commented May 9, 2014

When authentication against a digest-md5 XMPP server, authentication is not successful, a not authenticated message is returned.
Configuration ans setup: example.xml simple client, against a Firebird server,

@pgstath
Copy link
Author

pgstath commented May 9, 2014

Resolving the error is quite simple, on the https://github.com/smiley22/S22.Xmpp/blob/master/Core/Sasl/Mechanisms/SaslDigestMd5.cs file, on line 154, we have

string digestUri = "imap/" + fields["realm"];

it should be replaced with

string digestUri = "xmpp/" + fields["realm"];

I can prepare a patch later on

@pgstath
Copy link
Author

pgstath commented May 9, 2014

After changing this the issue is solved

@pgstath
Copy link
Author

pgstath commented May 9, 2014

diff --git a/Core/Sasl/Mechanisms/SaslDigestMd5.cs b/Core/Sasl/Mechanisms/SaslDigestMd5.cs
index 536aa36..381e823 100644
--- a/Core/Sasl/Mechanisms/SaslDigestMd5.cs
+++ b/Core/Sasl/Mechanisms/SaslDigestMd5.cs
@@ -151,7 +151,7 @@ namespace S22.Xmpp.Core.Sasl.Mechanisms {
// Parse the challenge-string and construct the "response-value" from it.
string decoded = Encoding.ASCII.GetString(challenge);
NameValueCollection fields = ParseDigestChallenge(decoded);

  •       string digestUri = "imap/" + fields["realm"];
    
  •        string digestUri = "xmpp/" + fields["realm"];
        string responseValue = ComputeDigestResponseValue(fields, Cnonce, digestUri,
            Username, Password);
    

@j-mie j-mie linked a pull request Jun 1, 2014 that will close this issue
pgstath referenced this issue in mplogas/S22.Xmpp Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant