Skip to content

Commit e230ca6

Browse files
committed
fix: do the limiting thingy
1 parent 3b7479e commit e230ca6

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Features/ConfigPlus.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,7 @@ CON_COMMAND_F(sar_download_file, "sar_download_file <url> <filepath> [directory]
6161
return console->Print(sar_download_file.ThisPtr()->m_pszHelpString);
6262
}
6363

64-
std::string domain = std::regex_replace(args[1], std::regex("^[htps]*://([^/?:]+)/?.*$"), "$1");
65-
66-
if (!strcmp(domain.c_str(), args[1])) return console->Print("Invalid URL.\n"); // URL is missing protocol. Reject.
67-
68-
if (!Utils::EndsWith(domain, "portal2.sr") && !Utils::StartsWith(args[1], "https://raw.githubusercontent.com/p2sr/")) {
64+
if (!Utils::StartsWith(args[1], "https://s.portal2.sr/") && !Utils::StartsWith(args[1], "https://raw.githubusercontent.com/p2sr/")) {
6965
return console->Print("URL domain is not portal2.sr.\n");
7066
}
7167

0 commit comments

Comments
 (0)