mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Merge pull request #2863 from racam/master
login.html escape quotes + add qbittorrent-nox to gitignore + bug with startup info with qbittorrent-nox
This commit is contained in:
commit
d14805d065
4 changed files with 17 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
src/gui/geoip/GeoIP.dat
|
src/gui/geoip/GeoIP.dat
|
||||||
src/gui/geoip/GeoIP.dat.gz
|
src/gui/geoip/GeoIP.dat.gz
|
||||||
src/qbittorrent
|
src/qbittorrent
|
||||||
|
src/qbittorrent-nox
|
||||||
qbittorrent.pro.user*
|
qbittorrent.pro.user*
|
||||||
conf.pri
|
conf.pri
|
||||||
Makefile
|
Makefile
|
||||||
|
|
|
@ -157,7 +157,6 @@ int Application::exec(const QStringList ¶ms)
|
||||||
#ifdef DISABLE_GUI
|
#ifdef DISABLE_GUI
|
||||||
#ifndef DISABLE_WEBUI
|
#ifndef DISABLE_WEBUI
|
||||||
Preferences* const pref = Preferences::instance();
|
Preferences* const pref = Preferences::instance();
|
||||||
if (pref->isWebUiEnabled()) {
|
|
||||||
// Display some information to the user
|
// Display some information to the user
|
||||||
std::cout << std::endl << "******** " << qPrintable(tr("Information")) << " ********" << std::endl;
|
std::cout << std::endl << "******** " << qPrintable(tr("Information")) << " ********" << std::endl;
|
||||||
std::cout << qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(pref->getWebUiPort()))) << std::endl;
|
std::cout << qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(pref->getWebUiPort()))) << std::endl;
|
||||||
|
@ -167,7 +166,6 @@ int Application::exec(const QStringList ¶ms)
|
||||||
std::cout << qPrintable(tr("The Web UI administrator password is still the default one: %1").arg("adminadmin")) << std::endl;
|
std::cout << qPrintable(tr("The Web UI administrator password is still the default one: %1").arg("adminadmin")) << std::endl;
|
||||||
std::cout << qPrintable(tr("This is a security risk, please consider changing your password from program preferences.")) << std::endl;
|
std::cout << qPrintable(tr("This is a security risk, please consider changing your password from program preferences.")) << std::endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif // DISABLE_WEBUI
|
#endif // DISABLE_WEBUI
|
||||||
#else
|
#else
|
||||||
m_window = new MainWindow;
|
m_window = new MainWindow;
|
||||||
|
|
|
@ -1076,7 +1076,11 @@ void Preferences::setIgnoreSlowTorrentsForQueueing(bool ignore)
|
||||||
|
|
||||||
bool Preferences::isWebUiEnabled() const
|
bool Preferences::isWebUiEnabled() const
|
||||||
{
|
{
|
||||||
|
#ifdef DISABLE_GUI
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
return value("Preferences/WebUI/Enabled", false).toBool();
|
return value("Preferences/WebUI/Enabled", false).toBool();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setWebUiEnabled(bool enabled)
|
void Preferences::setWebUiEnabled(bool enabled)
|
||||||
|
|
|
@ -271,6 +271,10 @@ void AbstractWebApplication::translateDocument(QString& data)
|
||||||
// Remove keyboard shortcuts
|
// Remove keyboard shortcuts
|
||||||
translation.replace(mnemonic, "");
|
translation.replace(mnemonic, "");
|
||||||
|
|
||||||
|
// Use HTML code for quotes to prevent issues with JS
|
||||||
|
translation.replace("'", "'");
|
||||||
|
translation.replace("\"", """);
|
||||||
|
|
||||||
data.replace(i, regex.matchedLength(), translation);
|
data.replace(i, regex.matchedLength(), translation);
|
||||||
i += translation.length();
|
i += translation.length();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue