Delete expired session files when there is no traffic#8526
Delete expired session files when there is no traffic#8526adityatoshniwal merged 2 commits intopgadmin-org:masterfrom
Conversation
|
Hi @cbandy, |
We run in server mode, so a request can come from anywhere on our intranet. We trust most things not to be malicious there, but there's no guarantee. Here's what my idle (no recent user activity) pgAdmin sessions directory looks like before and after one OWASP scan: $ du -sh /var/lib/pgadmin/sessions
44.0K /var/lib/pgadmin/sessions
$ du -sh /var/lib/pgadmin/sessions
19.4M /var/lib/pgadmin/sessionsRunning a more intensive scan or scanning daily would quickly fill this disk. |
|
In that case, I think |
Most HTTP requests create a file in the sessions directory. Open browsers call "/misc/cleanup" every five minutes, but session files can accumulate after browsers are closed. Wake periodically to delete expired sessions according to the CHECK_SESSION_FILES_INTERVAL setting. Fixes: pgadmin-org#1999 Fixes: pgadmin-org#8355 Updates: pgadmin-org#2097
b9d2053 to
eaf6151
Compare
Done! I also moved the timer into a |
Most HTTP requests create a file in the sessions directory. Open browsers call
/misc/cleanupevery five minutes, but session files can accumulate after browsers are closed.This wakes periodically to delete expired sessions according to the
CHECK_SESSION_FILES_INTERVALsetting.Fixes: #1999
Fixes: #8355