-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreground depends on a tty, results in no session password being logged #19984
Comments
I'll take a look at it in the weekend. |
1 task
Thank you @Roxedus ! |
@Roxedus are you able to build/test yourself? diff --git a/src/app/application.cpp b/src/app/application.cpp
index e22f2f670..38df74aac 100644
--- a/src/app/application.cpp
+++ b/src/app/application.cpp
@@ -924,6 +924,7 @@ int Application::exec()
+ tr("The WebUI administrator password was not set. A temporary password is provided for this session: %1").arg(tempPassword) + u'\n'
+ tr("You should set your own password in program preferences.") + u'\n';
printf("%s", qUtf8Printable(warning));
+ fflush(stdout); // Necessary for environments (e.g. docker) where stdout is buffered
}
#endif // DISABLE_GUI
#endif // DISABLE_WEBUI
|
Yes, this patch works. (build) |
Same problem with static version : https://github.com/userdocs/qbittorrent-nox-static |
Chocobo1
added a commit
to Chocobo1/qBittorrent
that referenced
this issue
Nov 25, 2023
The messages printed out via stdout is usually important and short so there is no reason to buffer them. Closes qbittorrent#19984.
I have submitted a patch: #20018 |
glassez
pushed a commit
to glassez/qBittorrent
that referenced
this issue
Nov 26, 2023
The messages printed out via stdout is usually important and short so there is no reason to buffer them. Closes qbittorrent#19984. PR qbittorrent#20018.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
qBittorrent & operating system versions
qBittorrent: 4.6.1
Operating system: Ubuntu 20.04.5 LTS
Qt: 6.5.2-r0
libtorrent-rasterbar: info not present in SBOM
What is the problem?
This behavior has been present for a while, but has not caused any grief until 4.6.1 started logging the password in this area of the code.
The message that prints the temporary session password here does not run unless there is a tty present when it is running in the foreground, it is however shown when the application is told to shutdown (it presumably killed whatever was waiting/hanging on a tty) . The application does not show any other negative effects from running in the foreground without a tty (containers has done this for years).
Steps to reproduce
Run the official container without a tty and notice the lack of the
A temporary password is provided for this session
message.(ctrl + c starts the shutdown process, and you can now see the message getting logged)
then run the same image, but with a tty (-t) assigned.
Additional context
No response
Log(s) & preferences file(s)
No response
The text was updated successfully, but these errors were encountered: