From df89658d6fb62136b3c28a2122862d33b0320098 Mon Sep 17 00:00:00 2001
From: Joshua Goins <josh@redstrate.com>
Date: Mon, 14 Jul 2025 20:11:56 -0400
Subject: [PATCH] Fix possible erroneous trailing space in OAuth scope
 parameter

(cherry picked from commit f17762668e9c9f27b4b338dbed6ec4cb3824772d)

Co-authored-by: Laura Hausmann <laura@hausmann.dev>
---
 src/account/abstractaccount.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/account/abstractaccount.cpp b/src/account/abstractaccount.cpp
index a4a0a1fe8..2f6865f46 100644
--- a/src/account/abstractaccount.cpp
+++ b/src/account/abstractaccount.cpp
@@ -156,7 +156,7 @@ void AbstractAccount::registerApplication(const QString &appName, const QString
     const QJsonObject obj{
         {QStringLiteral("client_name"), appName},
         {QStringLiteral("redirect_uris"), m_redirectUri},
-        {QStringLiteral("scopes"), QStringLiteral("read write follow %1").arg(m_additionalScopes)},
+        {QStringLiteral("scopes"), QStringLiteral("read write follow %1").arg(m_additionalScopes).trimmed()},
         {QStringLiteral("website"), website},
     };
     const QJsonDocument doc(obj);
-- 
GitLab

