Browse Source

Prevent Rust from falling victim to trailing slashitis

pull/24/head
Duke Leto 3 years ago
parent
commit
fe6f38d0bd
  1. 5
      src/settings.cpp

5
src/settings.cpp

@ -30,6 +30,11 @@ Config Settings::getSettings() {
bool sticky = s.value("connection/stickyServer").toBool();
bool torOnly = s.value("connection/torOnly").toBool();
while (server.endsWith("/")) {
// trailing slashes make Rust sad
server.chop(1);
}
// Users that have old configs generated from old SDLs will have this hostname
if(server == malicious or server == (QString("https://") + malicious)) {
qDebug() << "Replacing malicious SDL server with " << server;

Loading…
Cancel
Save