Uploaded image for project: 'SR Platform'
  1. SR Platform
  2. SRPLAT-1442

Fragment validation does not check for empty module key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • L3
    • Resolution: Done
    • 6.18.0
    • 6.19.0
    • None
    • DevTools 94
    • 0.8

    Description

      When configuring a script fragment, for fragments where a module key must be specified we check for a null value, but we do not check for an empty string, e.g if the user types a single space into the field.

      If such a configuration exists, when the related fragment is registered exceptions will be thrown that break interacting with the app via the UPM.

      We should prevent usage of null/empty module keys, and prevent registration of any such configurations.

      2021-01-29 09:06:45,439 UpmAsynchronousTaskManager:thread-1 WARN admin 545x131x3 1r7hblh 0:0:0:0:0:0:0:1 /rest/plugins/1.0/available/featured [c.o.scriptrunner.fragments.FragmentsManager] Execution of Fragment script failed
      java.lang.IllegalArgumentException: Invalid module key specified: 
      	at com.atlassian.plugin.ModuleCompleteKey.<init>(ModuleCompleteKey.java:49)
      	at com.atlassian.plugin.ModuleCompleteKey.<init>(ModuleCompleteKey.java:29)
      	at com.atlassian.plugin.manager.ProductPluginAccessorBase.isPluginModuleEnabled(ProductPluginAccessorBase.java:195)
      	at com.atlassian.plugin.manager.ForwardingPluginAccessor.isPluginModuleEnabled(ForwardingPluginAccessor.java:92)
      	at com.atlassian.plugin.manager.EnabledModuleCachingPluginAccessor.isPluginModuleEnabled(EnabledModuleCachingPluginAccessor.java:35)
      	at com.atlassian.plugin.manager.ForwardingPluginAccessor.isPluginModuleEnabled(ForwardingPluginAccessor.java:92)
      	at com.atlassian.plugin.manager.ProductPluginAccessor.isPluginModuleEnabled(ProductPluginAccessor.java:18)
      

       

      Attachments

        Activity

          People

            rlander Reece Lander
            rlander Reece Lander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: