Plugin Upload issue

Hi,
I noticed a weird behavior issue with the plugin admin section.
When uploading plugins, the jar is saved with the provided name, and a folder created with the same.
All fine and good, and updates of the same plugin with the same name go smoothly.
However, it is quite easy to make the mistake of uploading a differently named jar. (I was doing some testing yesterday and had named jars for a same plugin with different versions, say plugin1.jar plugin2.jar…
Openfire correctly uploads both, and then runs both, so the same plugin shows up twice, handlers also get registered twice.
I agree that is easily an ID10T or PEBKAC in nature, but there is another creepier and easier to trigger case, the classic repeated browser file download, which gives you files like “plugin.jar” “plugin.jar (2)”.

Might it be a good idea to consider enforcing name checks or a confirm of upload filename in the upload process in future openfire versions?

Thanks in advance
Paolo Manili

Thanks, that’s a good point. I’ve raised https://issues.igniterealtime.org/browse/OF-1715 to track it.

Greg

1 Like

@gdt’s fix for this issue was merged moments ago. I’d appreciate if you could test this, using any nightly that’s produced after now.

Sure, I’ll see if I can test it today on one of our dev servers.


Mail priva di virus. www.avast.com

1 Like

Sorry for getting back so late.
I’ve run a quick test on Openfire 4.4.1. I can confirm that now if a plugin is uploaded with a differing file name to an installed plugin the installation doesn’t complete (as per log warning message).
However strangely the plugin manager reported it as correctly installed.

A quick aside question:
I noticed that in the latest releases the openfire-plugin-assembly started producing jars named like
pluginname-openfire-plugin-assembly.jar.
Is it normal or have I messed up Maven?

This is normal. Used to distinguish between the “plugin” JAR file and the JAR file that contains just the classes.

Greg

1 Like