diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-08 23:07:13 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-08 23:10:19 +0100 |
commit | cf31fff5fe3c5e1291f1cba9a18490ce054eff70 (patch) | |
tree | 0654d53e4d7053d89ba2a81221500a89ac6a5e03 /src/MxcImageProvider.cpp | |
parent | 8effdbc447f399d29d9704c556f1faa3090a4b5f (diff) |
Fix blurry thumbnails AGAIN
Diffstat (limited to 'src/MxcImageProvider.cpp')
-rw-r--r-- | src/MxcImageProvider.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp index f77f2b0a..4834c2fc 100644 --- a/src/MxcImageProvider.cpp +++ b/src/MxcImageProvider.cpp @@ -100,7 +100,11 @@ MxcImageProvider::download(const QString &id, if (temp != infos.end()) encryptionInfo = *temp; - if (requestedSize.isValid() && !encryptionInfo) { + if (requestedSize.isValid() && + !encryptionInfo + // Protect against synapse not following the spec: + // https://github.com/matrix-org/synapse/issues/5302 + && requestedSize.height() <= 600 && requestedSize.width() <= 800) { QString fileName = QString("%1_%2x%3_%4_radius%5") .arg(QString::fromUtf8(id.toUtf8().toBase64( QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals))) |