Skip to content

Commit a26b79c

Browse files
committed
fix: also allow p2sr github raws
1 parent d989a4b commit a26b79c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Features/ConfigPlus.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ CON_COMMAND_F(sar_download_file, "sar_download_file <url> <filepath> [directory]
6565

6666
if (!strcmp(domain.c_str(), args[1])) return console->Print("Invalid URL.\n"); // URL is missing protocol. Reject.
6767

68-
if (domain.length() < 10 || !!strcmp(domain.c_str() + domain.length() - 10, "portal2.sr")) {
68+
if (domain.length() < 10 || !!strcmp(domain.c_str() + domain.length() - 10, "portal2.sr") &&
69+
!Utils::StartsWith(args[1], "https://raw.githubusercontent.com/p2sr/")) {
6970
return console->Print("URL domain is not portal2.sr.\n");
7071
}
7172

0 commit comments

Comments
 (0)