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:
parent
51c5939ba6
commit
a1da067002
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue