Explorar el Código

ensure whitelist domains are not included with reject/block domains

tags/v1.2.3
Jonathan Cobb hace 4 años
padre
commit
5c04f6b50b
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. +3
    -0
      bubble-server/src/main/java/bubble/service/stream/StandardAppPrimerService.java

+ 3
- 0
bubble-server/src/main/java/bubble/service/stream/StandardAppPrimerService.java Ver fichero

@@ -17,6 +17,7 @@ import bubble.service.device.DeviceService;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.cobbzilla.util.collection.SingletonList;
import org.cobbzilla.util.string.StringUtil;
import org.cobbzilla.wizard.cache.redis.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -189,9 +190,11 @@ public class StandardAppPrimerService implements AppPrimerService {
if (!empty(rejectDomains) || !empty(blockDomains) || !empty(filterDomains) || !empty(flexDomains) || !empty(flexExcludeDomains)) {
for (String ip : accountDeviceIps.get(device.getUuid())) {
if (!empty(rejectDomains)) {
rejectDomains.removeAll(whiteListDomains);
AppRuleDriver.defineRedisRejectSet(redis, ip, app.getName() + ":" + app.getUuid(), rejectDomains.toArray(String[]::new));
}
if (!empty(blockDomains)) {
blockDomains.removeAll(whiteListDomains);
AppRuleDriver.defineRedisBlockSet(redis, ip, app.getName() + ":" + app.getUuid(), blockDomains.toArray(String[]::new));
}
if (!empty(whiteListDomains)) {


Cargando…
Cancelar
Guardar