mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for IPV6
This commit is contained in:
@@ -287,9 +287,15 @@ public class StatViewServlet extends HttpServlet {
|
||||
boolean ipV6 = remoteAddress != null && remoteAddress.indexOf(':') != -1;
|
||||
|
||||
if (ipV6) {
|
||||
if ("0:0:0:0:0:0:0:1".equals(remoteAddress)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (denyList.size() == 0 && allowList.size() == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
IPAddress ipAddress = new IPAddress(remoteAddress);
|
||||
|
||||
@@ -100,6 +100,9 @@ public class StringUtils {
|
||||
}
|
||||
|
||||
public static int lowerHashCode(String text) {
|
||||
if (text == null) {
|
||||
return 0;
|
||||
}
|
||||
// return text.toLowerCase().hashCode();
|
||||
int h = 0;
|
||||
for (int i = 0; i < text.length(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user