From 99b211e4d9b7aa742c24b3bd6f0aa4b0efc585af Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 20 Oct 2019 13:05:46 +0800 Subject: [PATCH] remove url filtering for backup --- bot.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/bot.go b/bot.go index 1b93aa3..d3f5354 100644 --- a/bot.go +++ b/bot.go @@ -440,17 +440,19 @@ func botBackupImport(m *tb.Message) { TGCmdQueue <- c return } - r := regexp.MustCompile(`^((http[s]?\:)\/\/)?([^\?\:\/#]+)(\:([0-9]+))?(\/[^\?\#]*)?(\?([^#]*))?(#.*)?.zip$`) - if !r.MatchString(m.Payload) { - c := TGCommand{ - Type: commandReplyMsg, - Text: "URL not valid.", - FromMsgID64: int64(m.ID), - FromChatID64: m.Chat.ID, + /* + r := regexp.MustCompile(`^((http[s]?\:)\/\/)?([^\?\:\/#]+)(\:([0-9]+))?(\/[^\?\#]*)?(\?([^#]*))?(#.*)?.zip$`) + if !r.MatchString(m.Payload) { + c := TGCommand{ + Type: commandReplyMsg, + Text: "URL not valid.", + FromMsgID64: int64(m.ID), + FromChatID64: m.Chat.ID, + } + TGCmdQueue <- c + return } - TGCmdQueue <- c - return - } + */ p := JobPayloadBackupImport{ URL: m.Payload,