OFBiz
  1. OFBiz
  2. OFBIZ-543

JavaMailContainer is broken for all password not consisting of only lowercase characters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: framework
    • Labels:
      None

      Description

      Hi,

      after 2 hours of debugging the JavaMailContainer and working with javamail properties and network traces i noticed that when creating the JavaMail session the Container transforms all property names and ALL property values (including the password) to lowercase. Thus authentication fails if the password does contain uppercase characters.

      The attached patch removes the conversion of property values to lowercase altogether, which fixes the issue. As i see no pressing issue to convert other property-values to lowercase i chose this way instead of excluding only selected properties.

      The second change to the Container prints out the Text of the exception which has occured when reporting that the mail store could not be opened to give the user a clue about the source (i.e. SSL trust chain verification problem).

      1. ofbiz_mail1.diff
        1 kB
        Stefan Huehner

        Activity

        Hide
        Jacques Le Roux added a comment -

        This patch seems good to me. If nobody complains I'm ready to apply it...

        Show
        Jacques Le Roux added a comment - This patch seems good to me. If nobody complains I'm ready to apply it...
        Hide
        Jacques Le Roux added a comment -

        OK for everybody (no response is an OK here...) ?

        Show
        Jacques Le Roux added a comment - OK for everybody (no response is an OK here...) ?
        Hide
        Jacopo Cappellato added a comment -

        I'm not an expert of this area but it looks good.
        There is just one little formatting issue: one tab in the first code chunk...

        Show
        Jacopo Cappellato added a comment - I'm not an expert of this area but it looks good. There is just one little formatting issue: one tab in the first code chunk...
        Hide
        Jacques Le Roux added a comment -

        Jacopo,

        Yes I saw the tab, waiting a little bit more...

        Show
        Jacques Le Roux added a comment - Jacopo, Yes I saw the tab, waiting a little bit more...
        Hide
        David E. Jones added a comment -

        This fix looks fine to me, and just fixes what looks like it really is a bug.

        Show
        David E. Jones added a comment - This fix looks fine to me, and just fixes what looks like it really is a bug.
        Hide
        Jacques Le Roux added a comment -

        Thanks Stefan,

        Your patch is in OFBiz revision: 488137

        Show
        Jacques Le Roux added a comment - Thanks Stefan, Your patch is in OFBiz revision: 488137

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Stefan Huehner
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development