forked from I2P_Developers/i2p.i2p
Add (more) IRCop (and other safe) commands to the IRCfilter whitelist
This commit is contained in:
@@ -101,7 +101,7 @@ abstract class IRCFilter {
|
|||||||
{
|
{
|
||||||
String msg;
|
String msg;
|
||||||
msg = field[idx++];
|
msg = field[idx++];
|
||||||
|
|
||||||
if(msg.indexOf(0x01) >= 0) // CTCP marker ^A can be anywhere, not just immediately after the ':'
|
if(msg.indexOf(0x01) >= 0) // CTCP marker ^A can be anywhere, not just immediately after the ':'
|
||||||
{
|
{
|
||||||
// CTCP
|
// CTCP
|
||||||
@@ -138,52 +138,94 @@ abstract class IRCFilter {
|
|||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Block the rest
|
// Block the rest
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Set<String> _allowedOutbound;
|
private static final Set<String> _allowedOutbound;
|
||||||
static {
|
static {
|
||||||
final String[] allowedCommands =
|
final String[] allowedCommands =
|
||||||
{
|
{
|
||||||
// "NOTICE", // can contain CTCP
|
// Commands that regular users might use
|
||||||
"MODE",
|
"ADMIN",
|
||||||
|
"AWAY", // should be harmless
|
||||||
|
"CYCLE",
|
||||||
|
"DCCALLOW",
|
||||||
|
"HELPME", "HELPOP", // helpop is what unrealircd uses by default
|
||||||
|
"INVITE",
|
||||||
|
"ISON", // jIRCii uses this for a ping (response is 303)
|
||||||
"JOIN",
|
"JOIN",
|
||||||
|
"KICK",
|
||||||
|
"KNOCK",
|
||||||
|
"LIST",
|
||||||
|
"LUSERS",
|
||||||
|
"MAP", // seems safe enough, the ircd should protect themselves though
|
||||||
|
"MODE",
|
||||||
|
"MOTD",
|
||||||
|
"NAMES",
|
||||||
"NICK",
|
"NICK",
|
||||||
|
// "NOTICE", // can contain CTCP
|
||||||
|
"OPER",
|
||||||
|
// "PART", // replace with filtered PART to hide client part messages
|
||||||
|
"PASS",
|
||||||
|
// "PING",
|
||||||
|
// "PONG", // replaced with a filtered PING/PONG since some clients send the server IP (thanks aardvax!)
|
||||||
|
// "QUIT", // replace with a filtered QUIT to hide client quit messages
|
||||||
|
"RULES",
|
||||||
|
"SETNAME",
|
||||||
|
"SILENCE",
|
||||||
|
"STATS",
|
||||||
|
"TOPIC",
|
||||||
|
"USERHOST",
|
||||||
|
"VHOST",
|
||||||
|
"WATCH",
|
||||||
"WHO",
|
"WHO",
|
||||||
"WHOIS",
|
"WHOIS",
|
||||||
"LIST",
|
"WHOWAS",
|
||||||
"NAMES",
|
// the next few are default aliases on unreal (+ anope)
|
||||||
"ADMIN",
|
"BOTSERV", "BS",
|
||||||
"MOTD",
|
|
||||||
"PASS",
|
|
||||||
// "QUIT", // replace with a filtered QUIT to hide client quit messages
|
|
||||||
"SILENCE",
|
|
||||||
"MAP", // seems safe enough, the ircd should protect themselves though
|
|
||||||
// "PART", // replace with filtered PART to hide client part messages
|
|
||||||
"OPER",
|
|
||||||
// "PONG", // replaced with a filtered PING/PONG since some clients send the server IP (thanks aardvax!)
|
|
||||||
// "PING",
|
|
||||||
"NICKSERV", "NS", // the next few are default aliases on unreal (+ anope)
|
|
||||||
"CHANSERV", "CS",
|
"CHANSERV", "CS",
|
||||||
"MEMOSERV", "MS",
|
|
||||||
"OPERSERV", "OS",
|
|
||||||
"HELPSERV",
|
"HELPSERV",
|
||||||
"HOSTSERV", "HS",
|
"HOSTSERV", "HS",
|
||||||
"BOTSERV", "BS",
|
"MEMOSERV", "MS",
|
||||||
|
"NICKSERV", "NS",
|
||||||
|
"OPERSERV", "OS",
|
||||||
"STATSERV",
|
"STATSERV",
|
||||||
"KICK",
|
|
||||||
"HELPME", "HELPOP", // helpop is what unrealircd uses by default
|
|
||||||
// IRCop commands
|
// IRCop commands
|
||||||
"ADCHAT", "ADDMOTD", "ADDOMOTD", "CHATOPS", "CHGHOST", "CHGIDENT", "CHGNAME", "DCCDENY", "DIE",
|
"ADCHAT",
|
||||||
"GLOBOPS", "GZLINE", "KILL", "KLINE", "LOCOPS", "NACHAT", "OPERMOTD", "REHASH", "RESTART", "SAJOIN",
|
"ADDMOTD",
|
||||||
"SAMODE", "SAPART", "SDESC", "SETHOST", "SETIDENT", "SHUN", "SPAMFILTER", "TEMPSHUN", "UNDCCDENY",
|
"ADDOMOTD",
|
||||||
"RULES",
|
"CHATOPS",
|
||||||
"TOPIC",
|
"CHGHOST",
|
||||||
"ISON", // jIRCii uses this for a ping (response is 303)
|
"CHGIDENT",
|
||||||
"INVITE",
|
"CHGNAME",
|
||||||
"AWAY", // should be harmless
|
"CLOSE",
|
||||||
|
"DCCDENY",
|
||||||
|
"DIE",
|
||||||
|
"GLOBOPS",
|
||||||
|
"GZLINE",
|
||||||
|
"HTM", // "High Traffic Mode"
|
||||||
|
"KILL",
|
||||||
|
"KLINE",
|
||||||
|
"LOCOPS",
|
||||||
|
"NACHAT",
|
||||||
|
"OPERMOTD",
|
||||||
|
"REHASH",
|
||||||
|
"RESTART",
|
||||||
|
"SAJOIN",
|
||||||
|
"SAMODE",
|
||||||
|
"SAPART",
|
||||||
|
"SDESC",
|
||||||
|
"SETHOST",
|
||||||
|
"SETIDENT",
|
||||||
|
"SHUN",
|
||||||
|
"SPAMFILTER",
|
||||||
|
"SQUIT",
|
||||||
|
"TEMPSHUN",
|
||||||
|
"UNDCCDENY",
|
||||||
|
"WALLOPS",
|
||||||
|
"ZLINE",
|
||||||
// http://tools.ietf.org/html/draft-mitchell-irc-capabilities-01
|
// http://tools.ietf.org/html/draft-mitchell-irc-capabilities-01
|
||||||
"CAP"
|
"CAP"
|
||||||
};
|
};
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
2011-11-28 kytv
|
||||||
|
* IRCClient: Add IRCop commands (and other safe commands) to the whitelist
|
||||||
|
|
||||||
2011-11-27 zzz
|
2011-11-27 zzz
|
||||||
* IRCClient: Outbound whitelist optimization
|
* IRCClient: Outbound whitelist optimization
|
||||||
* Reseed:
|
* Reseed:
|
||||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
|||||||
/** deprecated */
|
/** deprecated */
|
||||||
public final static String ID = "Monotone";
|
public final static String ID = "Monotone";
|
||||||
public final static String VERSION = CoreVersion.VERSION;
|
public final static String VERSION = CoreVersion.VERSION;
|
||||||
public final static long BUILD = 9;
|
public final static long BUILD = 10;
|
||||||
|
|
||||||
/** for example "-test" */
|
/** for example "-test" */
|
||||||
public final static String EXTRA = "";
|
public final static String EXTRA = "";
|
||||||
|
Reference in New Issue
Block a user