Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6 - Domain counts are shown, but no individual domains shown. #1658

Closed
rdwebdesign opened this issue Oct 11, 2023 · 3 comments · Fixed by #1659
Closed

v6 - Domain counts are shown, but no individual domains shown. #1658

rdwebdesign opened this issue Oct 11, 2023 · 3 comments · Fixed by #1659

Comments

@rdwebdesign
Copy link
Member

Actual behavior / bug

Domains (custom allow/block) not showing on the web interface

image

Domain counts are shown, but no individual domains shown.

Expected behavior

All domains should be displayed.

Additional context

Users confirmed it is happening in Docker and bare metal installs.

@DL6ER
Copy link
Member

DL6ER commented Oct 11, 2023

FTL is sending the data correctly, the issue must be in the web interface code

@rdwebdesign
Copy link
Member Author

rdwebdesign commented Oct 12, 2023

FTL is sending the data correctly

I'm not sure this is the case.

I added domains as a test. The domain is added (the domain count increases), but they still are not shown on the table.

The POST request is sent and the response returns the new item (every parameter is returned correctly), BUT the request /api/domains returns incomplete data:

{
  "domains": [
    {
      "domain": "domain.com",
      "type": null,
      "kind": null,
      "comment": null,
      "groups": [ 0 ],
      "enabled": true,
      "id": 1,
      "date_added": 1697081542,
      "date_modified": 1697081542
    },
    {
      "domain": "domain2.com",
      "type": null,
      "kind": null,
      "comment": "comment",
      "groups": [ 0 ],
      "enabled": true,
      "id": 2,
      "date_added": 1697081745,
      "date_modified": 1697081745
    },
    {
      "domain": "domain3.com",
      "type": null,
      "kind": null,
      "comment": "comment",
      "groups": [ 0 ],
      "enabled": true,
      "id": 3,
      "date_added": 1697081810,
      "date_modified": 1697081810
    }
  ]
}

All these entries are type=deny and kind=exact, but the response for /api/domains returns type and kind as NULL.

If I try to filter by type using /api/domains/deny, the same response is shown (with nulls).

If I try /api/domains/deny/exact, type and kind are returned correctly (strange).

Details:
{
  "domains": [
    {
      "domain": "domain.com",
      "type": "deny",
      "kind": "exact",
      "comment": null,
      "groups": [
        0
      ],
      "enabled": true,
      "id": 1,
      "date_added": 1697081542,
      "date_modified": 1697081542
    },
    {
      "domain": "domain2.com",
      "type": "deny",
      "kind": "exact",
      "comment": "comment",
      "groups": [
        0
      ],
      "enabled": true,
      "id": 2,
      "date_added": 1697081745,
      "date_modified": 1697081745
    },
    {
      "domain": "domain3.com",
      "type": "deny",
      "kind": "exact",
      "comment": "comment",
      "groups": [
        0
      ],
      "enabled": true,
      "id": 3,
      "date_added": 1697081810,
      "date_modified": 1697081810
    }
  ]
}

@DL6ER
Copy link
Member

DL6ER commented Oct 12, 2023

You are right, this is actually a regression of #1649.

The fix is very simple. It comes done to that FTL added the exact/deny (etc.) arguments only when it exactly knew what you were requesting (hence, your observation that /api/domains/deny/exact works). However, any wildcard requests (like everything or all regex, or all allowed entries, ...) returned NULLs because they have not been considered in the corresponding switch.

I will move this issue into FTL space and put up a bugfix for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants