Commit 9b99cd9b authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-78] I believe I am now catching all valid username issues.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5589 b35dd754-fafc-0310-a699-88a17e54d16e
parent f89854bd
......@@ -70,7 +70,7 @@ public class IRCTransport extends BaseTransport {
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isUsernameValid(String)
*/
public Boolean isUsernameValid(String username) {
return username.matches("\\p{Alnum}+");
return username.matches("\\w+");
}
/**
......
......@@ -72,7 +72,7 @@ public class MSNTransport extends BaseTransport {
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isUsernameValid(String)
*/
public Boolean isUsernameValid(String username) {
return username.matches("\\w+@[\\w\\.]+");
return username.matches("[^ \\p{Cntrl}()@,;:\\\\\"\\[\\]]+@[^ \\p{Cntrl}()@,;:\\\\\"\\[\\]]+");
}
/**
......
......@@ -67,10 +67,10 @@ public class OSCARTransport extends BaseTransport {
*/
public Boolean isUsernameValid(String username) {
if (getType() == TransportType.icq) {
return username.matches("\\p{Digit}+");
return username.matches("\\d+");
}
else {
return username.matches("\\p{Alnum}+") || username.matches("\\w+@[\\w\\.]+");
return username.matches("\\w+") || username.matches("\\w+@[\\w\\.]+");
}
}
......
......@@ -72,7 +72,7 @@ public class YahooTransport extends BaseTransport {
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isUsernameValid(String)
*/
public Boolean isUsernameValid(String username) {
return username.matches("\\p{Alnum}+");
return username.matches("\\w+");
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment