<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Dear Balz<br>
      <br>
      I have no committed the Base64 improvements inside the branch
      "base64", whereas I have made the following changes:<br>
      <br>
      git diff master..base64<br>
      diff --git
      a/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java
      b/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java<br>
      index a65c9df..2f1bac5 100644<br>
      ---
      a/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java<br>
      +++
      b/src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java<br>
      @@ -2007,7 +2007,7 @@ public class YanelServlet extends
      HttpServlet {<br>
               }<br>
       */<br>
       <br>
      -        // HTTP BASIC Authentication (For clients such as for
      instance Sunbird, OpenOffice or cadaver)<br>
      +        // HTTP BASIC Authentication (For clients such as for
      instance Thunderbird Lightning, OpenOffice or cadaver)<br>
               // IMPORT NOTE: BASIC Authentication needs to be checked
      on every request, because clients often do not support session
      handling<br>
               String authorizationHeader =
      request.getHeader("Authorization");<br>
               if (log.isDebugEnabled()) log.debug("No identity attached
      to session, hence check request authorization header: " +
      authorizationHeader);<br>
      @@ -2015,10 +2015,17 @@ public class YanelServlet extends
      HttpServlet {<br>
                   if
      (authorizationHeader.toUpperCase().startsWith("BASIC")) {<br>
                       // Get encoded user and password, comes after
      "BASIC "<br>
                       String userpassEncoded =
      authorizationHeader.substring(6);<br>
      -                // Decode it, using any base 64 decoder<br>
      -                sun.misc.BASE64Decoder dec = new
      sun.misc.BASE64Decoder();<br>
      -                String userpassDecoded = new
      String(dec.decodeBuffer(userpassEncoded));<br>
      -                log.debug("Username and Password Decoded: " +
      userpassDecoded);<br>
      +                // INFO: Decode it, using base 64 decoder<br>
      +   <br>
      +                // DEPRECATED<br>
      +                //sun.misc.BASE64Decoder dec = new
      sun.misc.BASE64Decoder();<br>
      +                //String userpassDecoded = new
      String(dec.decodeBuffer(userpassEncoded));<br>
      +<br>
      +                java.util.Base64.Decoder decoder =
      java.util.Base64.getMimeDecoder();<br>
      +                String userpassDecoded = new
      String(decoder.decode(userpassEncoded));<br>
      +<br>
      +                log.debug("Username and Password decoded: " +
      userpassDecoded);<br>
      +<br>
                       String[] up = userpassDecoded.split(":");<br>
                       String username = up[0];<br>
                       String password = up[1];<br>
      <br>
      <br>
      It works for me locally with Java 8, testing BASIC authentication
      (for example Thuderbird Calendar/Lightning).<br>
      <br>
      Will test it later today on Java 9.<br>
      <br>
      All the best<br>
      <br>
      Michael<br>
      <br>
      Am 05.03.18 um 15:02 schrieb Michael Wechner:<br>
    </div>
    <blockquote cite="mid:5A9D4DFF.6050107@wyona.com" type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Dear Balz<br>
        <br>
        Am 05.03.18 um 10:18 schrieb basZero:<br>
      </div>
      <blockquote
cite="mid:CAOXzDSF2iJjJfVvWKDxP2YT+AGUCLv=gTDg4uV9pUB0ZQT1xBw@mail.gmail.com"
        type="cite">
        <div dir="ltr">Dear Michael,
          <div><br>
          </div>
          <div>sounds good, but can you explain the reason why you
            upgrade to Java 9?</div>
          <div>I think it only makes sense to upgrade, if you also
            upgrade to Tomcat 9 (see <a moz-do-not-send="true"
              href="http://tomcat.apache.org/whichversion.html">http://tomcat.apache.org/whichversion.html</a>
            )</div>
        </div>
      </blockquote>
      <br>
      Because the laptop of my son is using Java 9 :-)<br>
      <br>
      <blockquote
cite="mid:CAOXzDSF2iJjJfVvWKDxP2YT+AGUCLv=gTDg4uV9pUB0ZQT1xBw@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>If somebody runs Yanel on Tomcat 8, Yanel won't work
            anymore.</div>
        </div>
      </blockquote>
      <br>
      why not? I am not sure anymore whether you mentioned that before,
      but if so, can you tell me once again.<br>
      <blockquote
cite="mid:CAOXzDSF2iJjJfVvWKDxP2YT+AGUCLv=gTDg4uV9pUB0ZQT1xBw@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div><br>
          </div>
          <div>In general, I'd appreciate a lot if Yanel would provide a
            branch for each tomcat version.</div>
          <div>The master branch will still (as today) contain the very
            latest code and yanel users can choose what they want.</div>
          <div><br>
          </div>
          <div>So before you make the upgrade, please create a branch
            tomcat8 (or something like that) so that the current tomcat8
            version before your upgrade is still easily available in
            future</div>
        </div>
      </blockquote>
      <br>
      The only difference will be the Base64 implementation inside
      YanelServlet, so I think it will be backwards compatible.<br>
      <br>
      I will make a branch first anyway and let you know, such that you
      can test it as well.<br>
      <br>
      All the best<br>
      <br>
      Michael<br>
      <blockquote
cite="mid:CAOXzDSF2iJjJfVvWKDxP2YT+AGUCLv=gTDg4uV9pUB0ZQT1xBw@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div><br>
          </div>
          <div>Cheers</div>
          <div>Balz</div>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Sun, Mar 4, 2018 at 1:12 PM,
              Michael Wechner <span dir="ltr"><<a
                  moz-do-not-send="true"
                  class="moz-txt-link-abbreviated"
                  href="mailto:michael.wechner@wyona.com"><a class="moz-txt-link-abbreviated" href="mailto:michael.wechner@wyona.com">michael.wechner@wyona.com</a></a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0
                .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
                <br>
                I noticed that Java 9 on Mac does not provide anymore<br>
                sun.misc.BASE64Decoder and that we have to replace it by
                java.util.Base64<br>
                <br>
                -                sun.misc.BASE64Decoder dec = new
                sun.misc.BASE64Decoder();<br>
                -                String userpassDecoded = new<br>
                String(dec.decodeBuffer(<wbr>userpassEncoded));<br>
                +                //sun.misc.BASE64Decoder dec = new<br>
                sun.misc.BASE64Decoder();<br>
                +                //String userpassDecoded = new<br>
                String(dec.decodeBuffer(<wbr>userpassEncoded));<br>
                +                // TODO: Migrate to java.util.Base64<br>
                +                java.util.Base64.Decoder decoder =<br>
                java.util.Base64.<wbr>getMimeDecoder();<br>
                +                String userpassDecoded = new<br>
                String(decoder.decode(<wbr>userpassEncoded));<br>
                <br>
                I am currently testing this and if successful, would
                like to replace<br>
                it...also see<br>
                <br>
                <a moz-do-not-send="true"
href="https://stackoverflow.com/questions/35301409/migrating-from-sun-misc-base64-to-java-8-java-util-base64"
                  rel="noreferrer" target="_blank">https://stackoverflow.com/<wbr>questions/35301409/migrating-<wbr>from-sun-misc-base64-to-java-<wbr>8-java-util-base64</a><br>
                <br>
                Any objections?<br>
                <br>
                All the best<br>
                <span class="HOEnZb"><font color="#888888"><br>
                    Michael<br>
                    --<br>
                    Yanel-development mailing list <a
                      moz-do-not-send="true"
                      class="moz-txt-link-abbreviated"
                      href="mailto:Yanel-development@wyona.com"><a class="moz-txt-link-abbreviated" href="mailto:Yanel-development@wyona.com">Yanel-development@wyona.com</a></a><br>
                    <a moz-do-not-send="true"
                      href="http://mx2.wyona.com/cgi-bin/mailman/listinfo/yanel-development"
                      rel="noreferrer" target="_blank">http://mx2.wyona.com/cgi-bin/<wbr>mailman/listinfo/yanel-<wbr>development</a><br>
                  </font></span></blockquote>
            </div>
            <br>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>