%-encode username/password in greader plugin, provide content-type for http/post in ClientLogin method
This commit is contained in:
parent
e07c695b95
commit
9beb4dda8a
@ -30,7 +30,7 @@
|
|||||||
<url type="donation">https://martinrotter.github.io/donate/</url>
|
<url type="donation">https://martinrotter.github.io/donate/</url>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
<releases>
|
<releases>
|
||||||
<release version="3.9.2" date="2021-05-19"/>
|
<release version="3.9.2" date="2021-05-20"/>
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.0">
|
<content_rating type="oars-1.0">
|
||||||
<content_attribute id="violence-cartoon">none</content_attribute>
|
<content_attribute id="violence-cartoon">none</content_attribute>
|
||||||
|
@ -360,6 +360,11 @@ void Application::restoreDatabaseSettings(bool restore_database, bool restore_se
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Application::parseCmdArgumentsFromOtherInstance(const QString& message) {
|
void Application::parseCmdArgumentsFromOtherInstance(const QString& message) {
|
||||||
|
if (message.isEmpty()) {
|
||||||
|
qDebugNN << LOGSEC_CORE << "No execution message received from other app instances.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
qDebugNN << LOGSEC_CORE
|
qDebugNN << LOGSEC_CORE
|
||||||
<< "Received"
|
<< "Received"
|
||||||
<< QUOTE_W_SPACE(message)
|
<< QUOTE_W_SPACE(message)
|
||||||
|
@ -379,13 +379,17 @@ QNetworkReply::NetworkError GreaderNetwork::clientLogin(const QNetworkProxy& pro
|
|||||||
QString full_url = generateFullUrl(Operations::ClientLogin);
|
QString full_url = generateFullUrl(Operations::ClientLogin);
|
||||||
auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
|
auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
|
||||||
QByteArray output;
|
QByteArray output;
|
||||||
QByteArray args = QSL("Email=%1&Passwd=%2").arg(username(), password()).toUtf8();
|
QByteArray args = QSL("Email=%1&Passwd=%2").arg(QString::fromLocal8Bit(QUrl::toPercentEncoding(username())),
|
||||||
|
QString::fromLocal8Bit(QUrl::toPercentEncoding(password()))).toLocal8Bit();
|
||||||
auto network_result = NetworkFactory::performNetworkOperation(full_url,
|
auto network_result = NetworkFactory::performNetworkOperation(full_url,
|
||||||
timeout,
|
timeout,
|
||||||
args,
|
args,
|
||||||
output,
|
output,
|
||||||
QNetworkAccessManager::Operation::PostOperation,
|
QNetworkAccessManager::Operation::PostOperation,
|
||||||
{},
|
{ {
|
||||||
|
QSL(HTTP_HEADERS_CONTENT_TYPE).toLocal8Bit(),
|
||||||
|
QSL("application/x-www-form-urlencoded").toLocal8Bit()
|
||||||
|
} },
|
||||||
false,
|
false,
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user