FreeTAKTeam / FreeTakServer

Situational Awareness Server compatible with TAK clients
Eclipse Public License 2.0
639 stars 165 forks source link

Problem: AllowedCLIIP config implemention throws errors #406

Closed argltuc closed 4 months ago

argltuc commented 1 year ago

When setup FreeTakServer (latest master commit 56ea1f6) by executing pip install -e ./ from project root, resulting FTS service module FreeTAKServer.controllers.services.FTS is not runable due to missing regular expression module:

"FreeTAKServer\FreeTAKServer\controllers\configuration\MainConfig.py", line 183, in MainConfig
    AllowedCLIIPs = re.split(r'[,:]', os.environ.get("FTS_CLI_WHITELIST")) or AllowedCLIIPs
NameError: name 're' is not defined

After importing re module, implemention of splitting enironment variable FTS_CLI_WHITELIST throws errors, if environment variable is not set on host.

Related lines in sources: https://github.com/FreeTAKTeam/FreeTakServer/blob/56ea1f647b79bd79a5c586730f2bca106a767f80/FreeTAKServer/controllers/configuration/MainConfig.py#L183

brothercorvo commented 1 year ago

@dlc-ariel I think we removed the package because of 3.11?

dlc-ariel commented 1 year ago

@brothercorvo No, this package is still a requirement. This issue is already being addressed by @hickey in #386. We can wait for the 386 to be complete or accept this pr

hickey commented 1 year ago

I have moved #386 out of draft as I have resolved all the lingering issues. I would somewhat like to wait until #400 is complete and merged so that I can rebase #386 and see that the testing gets better and let #386 go through a full lint. I just commented on #400 and think that it is ready once the one test failing linting is comment out (see my last comment on that issue).

argltuc commented 1 year ago

okay, i didn't recognize the other PR related to this problem. Since it seems a more complex problem instead just a quick hotfix, it would be preferable to follow #400 and #386 and close my related PR #407 but leave this issue open for reference until #386 is merged.