Bug 499276

Summary: Set a dedicated User-Agent
Product: [Applications] Tokodon Reporter: Daenney <kde>
Component: generalAssignee: Unassigned bugs <unassigned-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: carl, josh
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In: 24.12.3
Sentry Crash Report:

Description Daenney 2025-01-29 12:03:39 UTC
SUMMARY

Tokodon's user-agent is currently Mozilla/5.0, according to my logs. This makes Tokodon hard to identify in the logs, and it's generally a nice thing for applications to set a non-generic user-agent.

STEPS TO REPRODUCE
1. Start Tokodon
2. Look at my server request logs

OBSERVED RESULT

userAgent=Mozilla/5.0 method=GET statusCode=200 path=/api/v1/follow_requests

EXPECTED RESULT

I would like to see a user-agent of Tokodon/version, where version is the current version of Tokodon.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Comment 1 Joshua Goins 2025-01-29 15:50:08 UTC
I agree, this is something we should definitely do.
Comment 2 Bug Janitor Service 2025-02-19 01:03:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/tokodon/-/merge_requests/719
Comment 3 Joshua Goins 2025-02-19 01:16:30 UTC
Git commit 96584230ce68c8ec2c5f9c6119bdce460256c2e2 by Joshua Goins.
Committed on 19/02/2025 at 01:03.
Pushed by redstrate into branch 'master'.

Set a dedicated user agent

This should make it easier for servers to see Tokodon in their logs,
instead of the default Mozilla user agent. An example user agent is
"tokodon/25.03.70".

M  +3    -0    src/account/account.cpp

https://invent.kde.org/network/tokodon/-/commit/96584230ce68c8ec2c5f9c6119bdce460256c2e2
Comment 4 Joshua Goins 2025-02-19 01:31:29 UTC
Git commit ab46cbe88c9cd4fa41da53909154f1b3f902cd68 by Joshua Goins.
Committed on 19/02/2025 at 01:26.
Pushed by redstrate into branch 'release/24.12'.

Set a dedicated user agent

This should make it easier for servers to see Tokodon in their logs,
instead of the default Mozilla user agent. An example user agent is
"tokodon/25.03.70".
(cherry picked from commit 96584230ce68c8ec2c5f9c6119bdce460256c2e2)

M  +3    -0    src/account/account.cpp

https://invent.kde.org/network/tokodon/-/commit/ab46cbe88c9cd4fa41da53909154f1b3f902cd68