powered by Jive Software

Minor but important bug in packetfilter rule-edit-form.jsp

In file rule-edit-form.jsp for packetfilter plugin.

There is a minor bug: at line 171:

if (destJID == null || !(sourceJID.length() > 0)) {

this should actually be

if (destJID == null || !(destJID.length() > 0)) {

so please fix it.

Can you explain a bit what is happening and how it should work. I’m not a developer, so i don’t understand what is wrong here and i need a description to file a bug ticket.

Well purpose of that line is to check if destJID entered is NOT empty. Instead of checking length of destJID it is checking length of sourceJID.

Original coder seems to have copy-pasted and modified line 145 which checks sourceJID.

So when modifying the line 171 (which is copy of 145) for destJID, original coder forgot about modifying OR (||) side of if condition.

You can paste this post and above post in your ticket.

The developers will not take more than 30 seconds to understand what is wrong.

Its just a minor bug and fix is also small. (but important to avoid having empty destJID)

regards.

Ok, i have filed this as OF-643. Assigned to Nate (original author of this plugin), though it seems he hasn’t logged in for a long time. Maybe someone else will review this and commit a fix.

You forgot to mention the name of the file in your ticket,

In file rule-edit-form.jsp for packetfilter plugin.

Fixed. Thanks.