You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using an external Postgres database as storage for Gowitness results, the dashboard (in the server web UI) is non-functional (see the screenshot below). Additionally, the following error is shown in the logs of the Gowitness server:
2024/10/30 06:59:47 INFO starting web server host=0.0.0.0 port=60001
2024/10/30 06:59:47 "GET http://localhost:60001/ HTTP/1.1" from 172.17.0.1:62582 - 200 481B in 13.650958ms
2024/10/30 06:59:47 "GET http://localhost:60001/assets/index-DewcPO5K.css HTTP/1.1" from 172.17.0.1:62582 - 200 42932B in 717.959µs
2024/10/30 06:59:47 "GET http://localhost:60001/assets/index-Kdb9YQmt.js HTTP/1.1" from 172.17.0.1:62582 - 200 908278B in 2.643167ms
2024/10/30 06:59:47 github.com/sensepost/gowitness/web/api/statistics.go:38 ERROR: function pragma_page_count() does not exist (SQLSTATE 42883)
[99.330ms] [rows:0] SELECT page_count * page_size as size FROM pragma_page_count(), pragma_page_size()
2024/10/30 06:59:47 ERRO an error occured getting database size err="ERROR: function pragma_page_count() does not exist (SQLSTATE 42883)"
To Reproduce
Steps to reproduce the behavior:
Set up a PostgreSQL database
Perform a scan that stores some results in that database.
To add a bit of info, I did some googling when I encountered the error first. My hypothesis is that the issue is due to (unlike SQLite) Postgres does not support pragma_page_count and other pragma_* functions natively. So this would either need to be created on the server as (IE) SQL stored procedure, or in the client be replaced by Postgres equivalent SQL queries.
Describe the bug
When using an external Postgres database as storage for Gowitness results, the dashboard (in the server web UI) is non-functional (see the screenshot below). Additionally, the following error is shown in the logs of the Gowitness server:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dashboard shows statistics and overview of database metrics.
Screenshots
Version Information:
ghcr.io/sensepost/gowitness
Docker image:Additional context
Behavior was checked in Chrome, Firefox, and Zen. Result was the same across all.
Additionally, the gallery and overview pages of the Web UI do work as expected. The issue is limited to the dashboard page.
The text was updated successfully, but these errors were encountered: