Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-17523

Loss of information, field values truncated when auditing long strings

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 5.2, 5.1.N
    • Fix Version/s: 5.1.3, 5.2.1
    • Component/s: Auditing
    • Labels:
      None

      Description

      When auditing properties updates it is not expected that the audited values would be truncated. The expected behaviour is to store in audit the entire property value.

      How to reproduce?

      1)Install a 5.1.1
      2) Enable audit

      audit.enabled=true
      audit.alfresco-access.enabled=true
      audit.alfresco-access.sub-actions.enabled=true
      audit.sync.enabled=true
      

      3) enable the audit examples under /shared/classes/alfresco/extension/audit/ by removing the .sample
      4) Modify how a field is displayed when editing meta data properies. I picked the “cm:subject” field of the “dublincore” aspect.

                     <field id="cm:subject" >
                        <control template="/org/alfresco/components/form/controls/textarea.ftl" >
                           <control-param name="maxLength">65535</control-param>
                        </control>
                     </field>
      

      and set a maxlen of 65535
      5) restart alfresco.
      6) create a document and add dublin core aspect and fill in the subject field with:

      thisisthebegining qsdqsfqsdfqf qsdfqsdfqsdf <10K or more characters> qdsfqdsqdfqsdfqdsf qsdqdsfqsdf thisistheend
      

      7) save

      Observed result:
      Field value is saved and not trucated.
      But audited value is trucated.
      Have a look at:

      curl -u admin:admin "http://localhost:8080/alfresco/service/api/audit/query/alfresco-access?verbose=true&limit=10000000" | grep thisisthebegining
      

      Observe that the end of the field values is truncated when retrieved from the audit.

      Expected behaviour:
      End of the field should not be truncated.

      Hint:
      Saving the auded value in “alf_prop_serializable_value” when bigger thant 1024 will probably solve the problem. Please find attached the patch implementing that option.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs
                  Reporter:
                  pdubois Philippe Dubois [X] (Inactive)
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 week, 1 day, 1 hour, 15 minutes
                    1w 1d 1h 15m

                      Structure Helper Panel