c-bless / reveal

This project contains some PowerShell scripts used to collect system configurations or domain information. Furthermore it has a Flask based web application and API to import and analyze the results of collector scripts. It can export collected data to Excel via the Web-Interface or to JSON via API.
1 stars 1 forks source link

searchform "shares" fails if Host is used as filter #104

Closed c-bless closed 5 hours ago

c-bless commented 5 hours ago

Describe the bug The search form "shares" fails if Host is used as filter. The following line from stacktrace seams to be the reason.

  filters.append(Share.Host.ilike("%" + host + "%"))
c-bless commented 5 hours ago

the form has been altered to use share_filter and host_filter. The hostname is now added to the host_filter host_filter.append(Host.Hostname.notilike("%" + host + "%")). The database query is changed to use the share_filter as well as the host_filter:

 shares = Share.query.filter(*share_filter).join(Host).filter(*host_filter).all()