aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-12-27 13:14:53 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-12-27 13:14:53 +0100
commita113b8e4d7abff262f2de76983e0d372cf62d122 (patch)
tree6f231b941ac47942119bec1a30a69558079894cc
parentfd3e9f2b9720b9ba730938686b98cff3aa248984 (diff)
dashboard/app: handle no bug ID in emails better
We see these warnings when people CC syzbot on unrelated threads. If there is no command in the email, don't produce warning at all. On the other hand if there is a command, warn and send sender reply that syzbot can't find the corresponding bug.
-rw-r--r--dashboard/app/reporting_email.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go
index 555398160..045409455 100644
--- a/dashboard/app/reporting_email.go
+++ b/dashboard/app/reporting_email.go
@@ -331,7 +331,13 @@ func incomingMail(c context.Context, r *http.Request) error {
func loadBugInfo(c context.Context, msg *email.Email) (bug *Bug, bugReporting *BugReporting, reporting *Reporting) {
if msg.BugID == "" {
- log.Warningf(c, "no bug ID (%q)", msg.Subject)
+ if msg.Command == "" {
+ // This happens when people CC syzbot on unrelated emails.
+ log.Infof(c, "no bug ID (%q)", msg.Subject)
+ } else {
+ log.Warningf(c, "no bug ID (%q)", msg.Subject)
+ replyTo(c, msg, "Can't find the corresponding bug.", nil)
+ }
return nil, nil, nil
}
bug, _, err := findBugByReportingID(c, msg.BugID)