Group Filtering and Rule Editing

I love this plugin but am currently having some issues with it on OpenFire 3.5.2. I have two groups (Guests, Moderators). I only want Guests to be able to send a message to moderators and not anyone else so I setup the following rules:

Pass From guests to moderators

Drop From guests to Any

However, any messages from guests are being dropped even to people in the moderators group. Would caps be an issue in this case (For instance Guests v guests)? If so then when a rule is created it will default to lowercase when using a group as the To or From.

Also when I go to edit a rule it doesn’t load all the settings up for it. For instance it will load up most fo the settings unless the To or From option are set as Group then it will just default to the first group in the list rather than the selected group.

Any help?

Sounds like the filter doesn’t like something about your groups. What version of the filter are you using? I have new release that should be much faster for doing group based filtering. If you want to try it out I can send it to you. Also are there any errors in your logs?

Cheers,

Nate

I’m currently using version 2.0.1 of the plugin. After clearing out the error log then going in and adding new Packet Filter rules I get the following errors in the error log:

2008.08.13 16:48:01 [org.jivesoftware.openfire.plugin.rules.DbRuleManager.getLastOrderId(DbRuleManager.java:170)]
java.sql.SQLException: Illegal operation on empty result set.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:713)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2617)
at org.jivesoftware.openfire.plugin.rules.DbRuleManager.getLastOrderId(DbRuleManager.java:167)
at org.jivesoftware.openfire.plugin.rules.RuleManagerProxy.getLastOrder(RuleManagerProxy.java:64)
at org.jivesoftware.openfire.plugin.packetFilter.pf_002dmain_jsp._jspService(pf_002dmain_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java:229)
at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:99)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:66)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:42)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:99)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
2008.08.13 16:48:16 [org.jivesoftware.openfire.plugin.rules.DbRuleManager.getLastOrderId(DbRuleManager.java:170)]
java.sql.SQLException: Illegal operation on empty result set.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java:713)
at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:2617)
at org.jivesoftware.openfire.plugin.rules.DbRuleManager.getLastOrderId(DbRuleManager.java:167)
at org.jivesoftware.openfire.plugin.rules.DbRuleManager.addRule(DbRuleManager.java:215)
at org.jivesoftware.openfire.plugin.rules.DbRuleManager.addRule(DbRuleManager.java:204)
at org.jivesoftware.openfire.plugin.rules.RuleManagerProxy.addRule(RuleManagerProxy.java:34)
at org.jivesoftware.openfire.plugin.packetFilter.rule_002dform_jsp._jspService(rule_002dform_jsp.java:179)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.jivesoftware.openfire.container.PluginServlet.handleJSP(PluginServlet.java:229)
at org.jivesoftware.openfire.container.PluginServlet.service(PluginServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:99)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:66)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:42)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:70)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:99)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Sure, I’d like to try out the new version. My e-mail is available in my profile.

Thanks for the help.

I too am having problems with groups and packet filtering and I am using 2.0.1

I am doing the same as the OP with only allowing Collectors to message Admins

and Admins can message any

I however have the packets reject the collectors when they try to message any person not in admin

Sorry, I’ve haven’t had a chance to cut another 2.0.2 build yet. I should be able to get to it later today or tomorrow. I’ll just attach it to this thread when it’s ready.

Cheers,

Nate

I just posted a build of the new 2.0.2 version, you can get it here :

Packet Filter Plugin 2.0.2

From your error logs it looks like you got in some weird state with your database entries. I would recommend reinstalling the plugin from scratch. To do this :

  1. Stop the server

  2. Delete packetFilter.jar and the packetFilter directory from your openfire/plugins/ directory

  3. Run the following commands against your database

drop table pfRules;
delete from version where name="packetfilter";
  1. Copy the new jar file into your openfire/plugins directory

  2. Start pack up.

Hopefully this should fix your issues. Let me know if you have any troubles and I’ll help you debug futher.

Cheers,

Nate

It now works!

Thanks

Awesome! Thanks for the fast reply!