Reset gpodder session cookies on logout.

A sessionid cookie is stored when logging in to gpodder. After logging out, a
subsequent login with the same user name but incorrect password will succeed,
ignoring the authorization header. The incorrect password will be stored for
future use.

To fix this, reset the cookie jar for GPodderSync's network access manager at
logout.
This commit is contained in:
Jim Broadus 2019-12-30 14:00:54 -08:00
parent 51c5939ba6
commit a1da067002
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <QCoreApplication>
#include <QHostInfo>
#include <QNetworkAccessManager>
#include <QNetworkCookieJar>
#include <QSettings>
#include <QTimer>
@ -143,6 +144,10 @@ void GPodderSync::Logout() {
s.remove("gpodder_last_get");
api_.reset();
// Remove session cookies. QNetworkAccessManager takes ownership of the new
// object and frees the previous.
network_->setCookieJar(new QNetworkCookieJar());
}
void GPodderSync::GetUpdatesNow() {