Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6287172

SASL + Digest-MD5, charset quoted

XMLWordPrintable

    • b63
    • x86
    • linux

      FULL PRODUCT VERSION :
      java -version
      java version "1.5.0_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
      Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      uname -a
      Linux kobit 2.6.12-rc1-mm3 #1 PREEMPT Fri Apr 8 17:14:06 BST 2005 i686 Intel(R) Pentium(R) M processor 1.73GHz GenuineIntel GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      Generated challenge by SaslServer looks like:
      challenge: realm="127.0.0.2",nonce="dyj8GLppjkxfXXAfyWksPPdD/FfIwCXMOu+MMUCu",qop="auth",charset="utf-8",algorithm="md5-sess"

      All parameters are quoted, according to rfc2831 charset and algorithm value
      are not quoted.
      This implementation fails when used against fully rfc comformant implementation.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Just run attached code...

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      realm="127.0.0.2",nonce="dyj8GLppjkxfXXAfyWksPPdD/FfIwCXMOu+MMUCu",qop="auth",charset=utf-8,algorithm=md5-sess
      ACTUAL -
      realm="127.0.0.2",nonce="dyj8GLppjkxfXXAfyWksPPdD/FfIwCXMOu+MMUCu",qop="auth",charset="utf-8",algorithm="md5-sess"

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
              Map<String, String> props = new TreeMap<String, String>();
              props.put(Sasl.QOP, "auth");
              SaslServer ss = Sasl.createSaslServer("DIGEST-MD5", "xmpp",
                "127.0.0.2", props, authCallbackHandler);
              byte[] challenge = ss.evaluateResponse(new byte[0]);
              log.finest("challenge: " + new String(challenge));
       
      ---------- END SOURCE ----------
      ###@###.### 2005-06-17 08:49:50 GMT

            vinnie Vincent Ryan
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: