fixes bug#0021044
qua:wallysson dev:alberto git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@104444 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
66c15d74c8
commit
b991bdc601
|
@ -4,6 +4,9 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias;
|
package com.rjconsultores.ventaboletos.web.utilerias;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@ -138,15 +141,28 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
||||||
private boolean ipBloqueadoGeracaoServico() {
|
private boolean ipBloqueadoGeracaoServico() {
|
||||||
Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA");
|
Constante constanteServidorException = getConstanteService().buscarPorNomeConstante("SERVIDOR_EXCEPCION_GENERACION_CORRIDA");
|
||||||
String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
|
String ipConstante = constanteServidorException == null ? "" : constanteServidorException.getValorconstante();
|
||||||
|
|
||||||
|
log.info(" IP Constante: " + ipConstante);
|
||||||
|
|
||||||
if (ipConstante.equals("")) {
|
if (ipConstante.equals("")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> lsIps = new ArrayList<String>();
|
||||||
|
|
||||||
String ipExternalAWS = IPValidatorUtileria.getIpExternalAWS();
|
String ipExternalAWS = IPValidatorUtileria.getIpExternalAWS();
|
||||||
|
log.info("ipExternalAWS: "+ipExternalAWS);
|
||||||
|
|
||||||
|
String ip = IPValidatorUtileria.getIp();
|
||||||
|
log.info("ip: "+ip);
|
||||||
|
|
||||||
|
|
||||||
|
if (ipExternalAWS!=null){lsIps.add(ipExternalAWS);}
|
||||||
|
if (ip!=null){lsIps.add(ip);}
|
||||||
|
|
||||||
|
|
||||||
if (ipConstante.equals(IPValidatorUtileria.getIpExternalAWS())) {
|
if (lsIps.contains(ipConstante)) {
|
||||||
log.info(" IP capturado: " + ipExternalAWS);
|
log.info(" IP bloqueado");
|
||||||
log.info(" IP: " + ipConstante);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue