Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19507

Diff view of changes in the Extension Manager shows emails in clear

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Found by Sonarqube: https://sonarcloud.io/project/issues?resolved=false&rules=java%3AS2159&id=org.xwiki.platform%3Axwiki-platform&open=AW5-S7MI1Yj5qvzeRn5i

          private boolean isPrivateProperty(BaseProperty<?> property)
          {
              BaseCollection<?> object = property == null ? null : property.getObject();
              if (object != null) {
                  BaseClass xclass = object.getXClass(this.xcontextProvider.get());
                  if (xclass != null) {
                      PropertyClass propertyClass = (PropertyClass) xclass.get(property.getName());
                      String propertyType = propertyClass == null ? null : propertyClass.getClassType();
                      return "Password".equals(propertyType) || "Email".equals(propertyClass);
                  }
              }
              return false;
          }
      

      Should probably be "Email".equals(propertyType);

      Important: when fixing, please add a unit test.

      This line is executed 315 times by the unit/integration tests but there's no specific test to verify the type and that it's hidden for emails.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: