Struts does not reflect Text-Encoding setting change immediately

XMLWordPrintable

    • Severity 3 - Minor

      The following Struts properties are loaded on startup by ConfluenceStrutsSettings via ConfluenceStrutsConfigurationProvider (and reloaded on plugin install/uninstall):

      • struts.i18n.encoding
      • struts.multipart.maxFileSize (custom property)

      However, these property values should immediately reflect Confluence settings as set by `/admin/viewgeneralconfig.action`

      A Strut configuration reload should be triggered when those settings are changed. However, Struts has no mechanism to wait until completion of any pending requests prior to triggering the reload. So reloading immediately will cause any pending requests to malfunction including the request that changed these properties. A delayed reload of between 0.25-0.5s seems to remedy this issue (in the integration tests), however, it causes integration tests for the OfficeConnector plugin to fail. We are yet to investigate this further.

      Workaround

      Currently, for `struts.multipart.maxFileSize`, we are using the workaround of retrieving the AttachmentMaxFileSize directly from the SettingsService from ConfluenceJakartaMultipartRequest. So this functionality is not affected.

      We have no workaround for the text encoding property, and it will not be reflected in Struts until a server restart or plugin install/uninstall.

        1. image-2022-10-07-14-26-34-173.png
          159 kB
          Kusal Kithul-Godage

            Assignee:
            Kusal Kithul-Godage
            Reporter:
            Kusal Kithul-Godage
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: