Projects STRLCPY geneva Commits 6f7b9e2c
🤬
  • Server Port Strategy Hotfix

    For backwards compatibility, the engine was sometimes called using
    an int for the server port directly. This would cause an error, so
    casting to str() solves that without needing to change anything.
  • Loading...
  • Michael Harrity committed 3 years ago
    6f7b9e2c
    1 parent 8a919a9f
  • ■ ■ ■ ■ ■
    engine.py
    skipped 221 lines
    222 222   cmds = []
    223 223   for proto in ["tcp", "udp"]:
    224 224   # Need to change the match rule if multiple ports are specified
    225  - # Don't need to do any checking on the port since the iptables command can error, closing the engine
    226 225   # Default match policy is the protocol
    227 226   match_policy = proto
    228  - if any(x in self.server_port for x in [":", ","]):
     227 + # Don't need to do any checking on the port since the iptables command can error, closing the engine
     228 + # Change server port to str for backwards compatibility calling engine directly with an int
     229 + if any(x in str(self.server_port) for x in [":", ","]):
    229 230   match_policy = "multiport"
    230 231   
    231 232   cmds += ["iptables -%s %s -p %s --match %s --%s %s -j NFQUEUE --queue-num %d" %
    skipped 241 lines
Please wait...
Page is in error, reload to recover