mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Cannot manually add peers through WebUI #17296
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#17296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Flaconia on GitHub (Nov 12, 2025).
qBittorrent & operating system versions
qBittorrent: v5.1.3 WebUI (64-bit)
Qt: 6.10.0
Libtorrent: 2.0.11.0
Boost: 1.89.0
OpenSSL: 3.6.0
zlib: 1.3.1.1-motley
OS: TrueNAS Core 25.10.0 Goldeye (Debian)
Browser: Firefox 145.0 (64-bit)
What is the problem?
I can't manually add peers in the WebUI of my NAS. After I right click in the Nodes area and choose Add peers... the relative panel appears, I can fill the field but then, when trying to press the OK button, nothing happens. The button gets clicked and produces no effect whatsoever. The panel remains there intact and the peers are not added to the list, nor any message of any kind pops up.
Pressing Cancel correctly closes the panel.
Steps to reproduce
Additional context
No response
Log(s) & preferences file(s)
I'm not able to upload log and preference files cause I'm having trouble installing a File Browser on my NAS (File Browser throws me an error while installing) at the moment, if you strictly need them let me know and I'll try to provide them ASAP.
@qBittUser commented on GitHub (Nov 22, 2025):
Can you reproduce with v5.1.4?
@Flaconia commented on GitHub (Nov 24, 2025):
Yes, same behaviour.
Just to be sure, I tried to do the opposite, copy a peer's IP:port from the WebUI into my PC qB client.
In my PC what happens is I can click the OK button, I'm prompted with a message saying the peer has been added to the torrent but, checking in that torrent's peer list, the manually added IP doesn't appear.
This might indicate the issue comes from qB directly, not just from the WebUI.
Can anyone successfully add an IP whatsoever, and how do you do it?
Does the IP have to comply to certain conditions? Maybe the peer doesn't appear cause qB performs some kind of check and decides that Ip is not useful there?
@HanabishiRecca commented on GitHub (Nov 27, 2025):
Can you please look if there any errors in the browser console (press
Ctrl+Sift+Kwhile on the page)?That's expected behavior. Only active (transferring data) peers are shown there.
@Flaconia commented on GitHub (Nov 27, 2025):
There's one indeed:
Uncaught SyntaxError: "" string literal contains an unescaped line breakand a link to the source of the error:
addpeers.html:48:65This is the code that the link sends to:
@HanabishiRecca commented on GitHub (Nov 27, 2025):
Seems like translation has borked the source code. You could switch to english for now.
v5_1_xbranch has a line break here.github.com/qbittorrent/qBittorrent@33e5e77220/src/webui/www/translations/webui_it.ts (L328-L329)But current
masteris fine.github.com/qbittorrent/qBittorrent@a77b17e6da/src/webui/www/translations/webui_it.ts (L464)@glassez it needs a backport.
@HanabishiRecca commented on GitHub (Nov 27, 2025):
I actually feel a bit anxious about translations being able to inject arbitrary code, considering how they are being pulled.
Maybe some form of sanitization is required?
@Chocobo1 @glassez @Piccirello @sledgehammer999 @xavier2k6
@Piccirello commented on GitHub (Nov 27, 2025):
This is a really good point. I wonder if our translation injection function (
QBT_TR?) should strip certain characters, like newlines. Ideally it would also sanitize the values, but the sanitization would have to be context specific. For ex, html sanitization is distinctly different from JS sanitization.@HanabishiRecca commented on GitHub (Nov 27, 2025):
I think the easiest way is to just convert all strings into Unicode escape sequences.
I.e.
"foo bar"->"\u0066\u006f\u006f\u0020\u0062\u0061\u0072".@Piccirello commented on GitHub (Nov 29, 2025):
The unicode escape sequences would work for escaping strings injected into JS, but I don't think they'd prevent XSS in HTML.